Muhammad bin Sirin reported,

Abu Hurairah said, "The Prophet ﷺ led us in one of the two afternoon prayers." Abu Hurairah added, "But I have forgotten which one."He said, "He prayed two rakahs with us, then gave the salam. He then walked over to a piece of wood that lay across the mosque and leaned his hand on it as though he were angry. Those in a hurry rushed out through the doors of the mosque, saying, 'The prayer has been shortened.' Among the people were Abu Bakr and Umar رضي الله عنهم, but they were too in awe of him to speak to him. Also among the people was a man with long arms who was called Dhul-Yadayn. He said, 'Messenger of Allah, did you forget, or has the prayer been shortened?'He replied, 'I have not forgotten, nor has the prayer been shortened.'Then he asked, 'Is it as Dhul-Yadayn says?'They said, 'Yes.'So he came forward and prayed what he had left out, then gave the salam. Then he said the takbir and prostrated like his usual prostration or longer, then raised his head and said the takbir. Then he said the takbir again and prostrated like his usual prostration or longer, then raised his head and said the takbir."

Nasai 1225

Sahih

أخبرنا حميد بن مسعدة قال حدثنا يزيد وهو ابن زريع قال حدثنا ابن عون

عن محمد بن سيرين قال

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

النسائي 1225صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Forgetfulness
Chapter
What one should do if he gives salaam after two rakahs forgetfully and speaks
Numbering
Darussalam 1225
Nasai 1225