Jabir bin Abdullah reported,

He narrated that Sulayk came while the Messenger of Allah ﷺ was delivering the sermon, and he sat down. The Prophet ﷺ commanded him to pray two rakahs.Muhammad said in his version of the hadith, "Then he turned to the people and said, 'When one of you comes while the imam is delivering the sermon, let him pray two brief rakahs.'"

Ahmad 14171

Sahih

حدثنا محمد بن جعفر حدثنا سعيد وثنا روح وعبد الوهاب عن سعيد عن الوليد أبي بشر عن طلحة قال عبد الوهاب الإسكاف إنه سمع

جابر بن عبد الله

يحدث أن سليكا جاء ورسول الله ﷺ يخطب فجلس فأمره النبي ﷺ أن يصلي ركعتين قال محمد في حديثه ثم أقبل على الناس فقال إذا جاء أحدكم والإمام يخطب فليصل ركعتين يتجوز فيهما

أحمد 14171صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Jabir bin Abdullah
Numbering
Darussalam 14171
Ahmad 14171