Sunan an-Nasa'i, Book 14, Hadith 1406 (In-Book)

It was narrated that 'Amr bin Dinar said: "I heard Jabir bin 'Abdullah say: 'The Messenger of Allah said: "If any one of you comes and the imam has appeared, let him pray two rak'ahs. Shu'bah (one of the narrators) said: "On Friday."

أَخْبَرَنَا مُحَمَّدُ بْنُ عَبْدِ الأَعْلَى، قَالَ حَدَّثَنَا خَالِدٌ، قَالَ حَدَّثَنَا شُعْبَةُ، عَنْ عَمْرِو بْنِ دِينَارٍ، قَالَ سَمِعْتُ جَابِرَ بْنَ عَبْدِ اللَّهِ، يَقُولُ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ ‏ "‏ إِذَا جَاءَ أَحَدُكُمْ وَقَدْ خَرَجَ الإِمَامُ فَلْيُصَلِّ رَكْعَتَيْنِ ‏" ‏ ‏.‏ قَالَ شُعْبَةُ يَوْمَ الْجُمُعَةِ ‏.‏

sunnah.com