Abdullah bin Buhaina (may Allah be pleased with him) narrates that the Messenger of Allah (ﷺ) led us in two rak‘ahs of a (four-rak‘ah) prayer, then he stood up without sitting (for tashahhud), and the people also stood up with him. When he completed the prayer, we began to wait for him to say the salam, but before saying the salam, he performed two prostrations while he was sitting, and then he said the salam.
Hadith Referenceمسند الإمام الشافعي / كتاب الصلاة / 327
Hadith Takhrijأخرجه البخاري: السهو، باب ما جاء في السهو إذا قام من ركعتي الفريضة: 1442 - ومسلم: المساجد، باب السهو في الصلاة والسجود له: 570.