صحيح البخاري Sahih Bukhari كتاب الجمعة The Book of Al-Jumuah (Friday)
بَابُ مَنْ جَاءَ وَالإِمَامُ يَخْطُبُ صَلَّى رَكْعَتَيْنِ خَفِيفَتَيْنِ:

(33) Chapter. Whoever comes when the Imam is delivering the Khutba (religious talk) should offer a light two Raka Salat (prayer) (Tahayyat-ul-Masjid).

1 hadith
Hadith 931
حَدَّثَنَا عَلِيُّ بْنُ عَبْدِ اللَّهِ ، قَالَ : حَدَّثَنَا سُفْيَانُ ، عَنْ عَمْرٍو ، سَمِعَ جَابِرًا ، قَالَ : دَخَلَ رَجُلٌ يَوْمَ الْجُمُعَةِ وَالنَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يَخْطُبُ ، فَقَالَ " أَصَلَّيْتَ ؟ قَالَ : لَا ، قَالَ : قُمْ فَصَلِّ رَكْعَتَيْنِ " .
Narrated Jabir: A man entered the Mosque while the Prophet was delivering the Khutba. The Prophet said to him, "Have you prayed?" The man replied in the negative. The Prophet said, "Pray two rak`at."
Hadith Reference Sahih Bukhari / The Book of Al-Jumuah (Friday) / Hadith: 931
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة