Language:
كتاب السهو
22  
Forgetfulness in Prayer
(3)
Chapter: If one finishes his Salat wit Taslim after offering two or three Rak'a (by mistake)
(3)
باب إِذَا سَلَّمَ فِي رَكْعَتَيْنِ أَوْ ثَلاَثٍ فَسَجَدَ سَجْدَتَيْنِ مِثْلَ سُجُودِ الصَّلاَةِ أَوْ أَطْوَلَ
Sahih al-Bukhari 1227

Narrated Abu Huraira:

The Prophet (ﷺ) led us in the `Asr or the Zuhr prayer and finished it with Taslim. Dhul-Yadain said to him, "O Allah's Messenger (ﷺ)! Has the prayer been reduced?" The Prophet (ﷺ) asked his companions in the affirmative. So Allah's Messenger (ﷺ) I offered two more rak`at and then performed two prostrations (of Sahu). Sa`d said, "I saw that 'Urwa bin Az-Zubair had offered two rak`at in the Maghrib prayer and finished it with Taslim. He then talked (and when he was informed about it) he completed the rest of his prayer and performed two prostrations, and said, 'The Prophet (ﷺ) prayed like this.' "

حَدَّثَنَا آدَمُ، حَدَّثَنَا شُعْبَةُ، عَنْ سَعْدِ بْنِ إِبْرَاهِيمَ، عَنْ أَبِي سَلَمَةَ، عَنْ أَبِي هُرَيْرَةَ ـ رضى الله عنه ـ قَالَ صَلَّى بِنَا النَّبِيُّ صلى الله عليه وسلم الظُّهْرَ أَوِ الْعَصْرَ فَسَلَّمَ، فَقَالَ لَهُ ذُو الْيَدَيْنِ الصَّلاَةُ يَا رَسُولَ اللَّهَ أَنَقَصَتْ فَقَالَ النَّبِيُّ صلى الله عليه وسلم لأَصْحَابِهِ ‏ "‏ أَحَقٌّ مَا يَقُولُ ‏"‏‏.‏ قَالُوا نَعَمْ‏.‏ فَصَلَّى رَكْعَتَيْنِ أُخْرَيَيْنِ ثُمَّ سَجَدَ سَجْدَتَيْنِ‏.‏ قَالَ سَعْدٌ وَرَأَيْتُ عُرْوَةَ بْنَ الزُّبَيْرِ صَلَّى مِنَ الْمَغْرِبِ رَكْعَتَيْنِ فَسَلَّمَ وَتَكَلَّمَ ثُمَّ صَلَّى مَا بَقِيَ وَسَجَدَ سَجْدَتَيْنِ وَقَالَ هَكَذَا فَعَلَ النَّبِيُّ صلى الله عليه وسلم‏.‏
Reference : Sahih al-Bukhari 1227
In-book reference : Book 22, Hadith 4
USC-MSA web (English) reference : Vol. 2, Book 22, Hadith 318
  (deprecated numbering scheme)