Abu Hurairah reported,

The Prophet ﷺ ended the prayer after two units. Dhul-Yadayn asked him, "Has the prayer been shortened, or have you forgotten, Messenger of Allah?"The Messenger of Allah ﷺ asked, "Is Dhul-Yadayn telling the truth?"The people answered, "Yes."So the Messenger of Allah ﷺ stood and prayed two more units, then gave the closing salutation. Then he said the takbir and prostrated like his usual prostration or longer, then said the takbir and rose, then prostrated like his usual prostration or longer.

Tirmidhi 399

Sahih

حدثنا الأنصاري حدثنا معن حدثنا مالك عن أيوب بن أبي تميمة وهو أيوب السختياني عن محمد بن سيرين

عن أبي هريرة

أن النبي ﷺ انصرف من اثنتين فقال له ذو اليدين أقصرت الصلاة أم نسيت يا رسول الله فقال رسول الله ﷺ أصدق ذو اليدين فقال الناس نعم فقام رسول الله ﷺ فصلى اثنتين أخريين ثم سلم ثم كبر فسجد مثل سجوده أو أطول ثم كبر فرفع ثم سجد مثل سجوده أو أطول

الترمذي 399صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Prayer
Chapter
Man who gives salam after two rakahs of Dhuhr and Asr
Numbering
Darussalam 399
Tirmidhi 399