Sahih Bukhari · Hadith 1170
Prayer at Night (Tahajjud) - كتاب التهجد
حدثنا آدم، قال أخبرنا شعبة، أخبرنا عمرو بن دينار، قال سمعت جابر بن عبد الله رضى الله عنهما قال قال رسول الله صلى الله عليه وسلم وهو يخطب " إذا جاء أحدكم والإمام يخطب أو قد خرج فليصل ركعتين ".
Narrated Jabir bin `Abdullah: While delivering a sermon, Allah's Apostle said, "If anyone of you comes while the Imam is delivering the sermon or has come out for it, he should offer a two rak`at prayer."
Gradings are classical jarḥ-wa-taʿdīl, name-matched to a rijāl index (not individually re-verified).