When he was in Mecca and prayed the Friday prayer, he would step forward and pray two rakats, then step forward again and pray four. When he was in Medina, he would pray the Friday prayer, then return to his house and pray two rakats, without praying in the mosque. He was asked about this, and he said, "The Messenger of Allah ﷺ used to do this."
حدثنا محمد بن عبد العزيز بن أبي رزمة المروزي أخبرنا الفضل بن موسى عن عبد الحميد بن جعفر عن يزيد بن أبي حبيب عن عطاء
كان إذا كان بمكة فصلى الجمعة تقدم فصلى ركعتين ثم تقدم فصلى أربعا وإذا كان بالمدينة صلى الجمعة ثم رجع إلى بيته فصلى ركعتين ولم يصل في المسجد فقيل له فقال كان رسول الله ﷺ يفعل ذلك
[Its isnad is sahih]. Bayhaqi narrated it, 3/240, 241, and Ibn Mulaqqin declared it sahih in Tuhfat al-Muhtaj, 1/397, 398, no. 430, and Tirmidhi summarized it greatly, no. 523.