A man came to the Prophet ﷺ while he was delivering the sermon, and the Prophet ﷺ asked him, "Have you prayed the two rakahs?"The man replied, "No."The Prophet ﷺ said, "Then pray them."Jabir used to say that even if a person had prayed at home, he liked for him to pray the two rakahs upon entering the mosque.
حدثنا عفان حدثنا يزيد بن إبراهيم حدثنا أبو الزبير
جاء رجل إلى النبي ﷺ وهو يخطب فقال أصليت الركعتين فقال لا قال فصلهما قال وكان جابر يقول إن صلى في بيته يعجبه إذا دخل أن يصليهما
Its isnad is sahih. Yazid bin Ibrahim Tustari is trustworthy and reliable, and the hadith has already appeared at 14243.