The Prophet ﷺ offered one of the evening prayers (the sub-narrator Muhammad said, "I think that it was most probably the ʿAsr prayer") and he finished it after offering two rakʿat only. He then stood near a price of wood in front of the Mosque and put his hand over it. Abu Bakr and ʿUmar were amongst those who were present, but they dared not talk to him about that (because of excessive respect for him), and those who were in a hurry went out. They said, "Has the prayer been reduced?" A man who was called Dhul-Yadain by the Prophet ﷺ said (to the Prophet), "Has the prayer been reduced or have you forgotten?" He said, "Neither have I forgotten, nor has the prayer been reduced." He said, "Certainly you have forgotten." So the Prophet ﷺ offered two more rakʿat and performed Taslim and then said Takbir and performed a prostration of Sahu like his ordinary prostration or a bit longer and then raised his head and said Takbir and then put his head down and performed a prostration like his ordinary prostration or a bit longer, and then raised his head and said Takbir. (Using translation from Bukhārī 1229)
أَنَّ رَسُولَ اللهِ ﷺ صَلَّى إِحْدَى صَلَاتِي الْعَشِيِّ الظُّهْرَ أَوِ الْعَصْرَ وَأَكْبَرُ ظَنِّي أَنَّهُ قَالَ الظُّهْرَ فَسَلَّمَ فِي الرَّكْعَتَيْنِ وَقَامَ إِلَى خَشَبَةٍ فِي مُقَدَّمِ الْمَسْجِدِ وَهُوَ غَضْبَانُ فَوَضَعَ يَدَهُ عَلَيْهَا وَفِي النَّاسِ أَبُو بَكْرٍ وَعُمَرُ فَهَابَاهُ أَنْ يُكَلِّمَاهُ وَخَرَجَ سَرَعَانُ النَّاسِ فَقَالُوا أَقَصُرَتِ الصَّلَاةُ؟ أَقَصُرَتِ الصَّلَاةُ؟ وَفِي النَّاسِ رَجُلٌ كَانَ رَسُولُ اللهِ ﷺ يَدْعُوهُ ذَا الْيَدَيْنِ فَقَالَ يَا رَسُولَ اللهِ أَنَسِيتَ أَمْ قَصُرَتِ الصَّلَاةُ؟ فَقَالَ لَهُ لَمْ أَنْسَ وَلَمْ تَقْصُرِ الصَّلَاةُ قَالَ بَلْ نَسِيتَ يَا رَسُولَ اللهِ قَالَ صَدَقَ ذُو الْيَدَيْنِ فَصَلَّى رَكْعَتَيْنِ ثُمَّ سَلَّمَ ثُمَّ كَبَّرَ فَسَجَدَ مِثْلَ سُجُودِهِ أَوْ أَطْوَلَ ثُمَّ رَفَعَ رَأْسَهُ فَكَبَّرَ ثُمَّ وَضَعَ رَأْسَهُ فَكَبَّرَ ثُمَّ سَجَدَ مِثْلَ سُجُودِهِ أَوْ أَطْوَلَ ثُمَّ رَفَعَ رَأْسَهُ وَكَبَّرَ