Hadith 1590
Sayyiduna Jabir bin Abdullah (may Allah be pleased with them both) narrates: The Noble Prophet (peace and blessings be upon him) said: "When any one of you comes (to the mosque) and the Imam is delivering the sermon or has come out for the sermon, he should perform two rak‘ahs of prayer."
Hadith 1591
Iyad bin Abdullah said: Sayyiduna Abu Sa'id al-Khudri (may Allah be pleased with him) came while Marwan was delivering the sermon. Sayyiduna Abu Sa'id (may Allah be pleased with him) stood up and began to pray, so Marwan's guards came and started preventing him from praying. Then Sayyiduna Abu Sa'id (may Allah be pleased with him) said: I will not abandon these two rak'ahs because I saw the Messenger of Allah (peace and blessings be upon him) commanding it.
Hadith 1592
Rabee’ bin Sabeeh Basri said: I saw Imam Hasan Basri (may Allah have mercy on him) praying two rak‘ahs during the sermon, and he said: The Messenger of Allah (peace and blessings be upon him) said: “When the Imam is delivering the sermon and one of you enters the mosque, let him pray two light rak‘ahs (Tahiyyat al-Masjid), and let him keep them brief.” Imam Darimi (may Allah have mercy on him) said: This is also my opinion.