AHMAD 14171:
from Jābir b. ʿAbdullāh —
[Machine] When Sulaykah came, the Messenger of Allah ﷺ was delivering a sermon, so he sat down. The Prophet ﷺ commanded him to pray two rak'ahs. Muhammad ﷺ mentioned in his hadith that Sulaykah then turned towards the people and said, "When one of you comes and the Imam is delivering a sermon, let him pray two rak'ahs as a precaution."
أحمد ١٤١٧١:
عن جابر بن عبد الله —
أَنَّ سُلَيْكًا جَاءَ وَرَسُولُ اللهِ ﷺ يَخْطُبُ فَجَلَسَ فَأَمَرَهُ النَّبِيُّ ﷺ أَنْ يُصَلِّيَ رَكْعَتَيْنِ قَالَ مُحَمَّدٌ فِي حَدِيثِهِ ثُمَّ أَقْبَلَ عَلَى النَّاسِ فَقَالَ إِذَا جَاءَ أَحَدُكُمْ وَالْإِمَامُ يَخْطُبُ فَلْيُصَلِّ رَكْعَتَيْنِ يَتَجَوَّزُ فِيهِمَا
hadithunlocked.com