The Messenger of Allah ﷺ prayed the noon prayer with two units, then gave the closing salutation. The people said, "Has the prayer been shortened?" He stood up and prayed two more units, then gave the closing salutation, and then performed two prostrations.
أخبرنا سليمان بن عبيد الله قال حدثنا بهز بن أسد قال حدثنا شعبة عن سعد بن إبراهيم أنه سمع أبا سلمة يحدث
أن رسول الله ﷺ صلى صلاة الظهر ركعتين ثم سلم فقالوا قصرت الصلاة فقام وصلى ركعتين ثم سلم ثم سجد سجدتين
Bukhari transmitted it in the Book of Adhan, chapter "Should the imam accept what the people say when he is in doubt?" (Hadith 715), from the hadith of Shuba with the same wording. It is also found in Kubra, Hadith 1150. There is another route for it in Muslim, Hadith 573, from the hadith of Abu Salama with the same wording. See the preceding hadith, no. 1225.