The Messenger of Allah ﷺ finished praying two rak'ahs,and Dhul-Yadain said to him: "Has the prayer been shortened or did you forget, O Messenger of Allah?" The Messenger of Allah ﷺ said: "Is Dhul-Yadain speaking the truth?" The people said: "Yes." So the Messenger of Allah ﷺ stood up and prayed two, then he said the takbir and prostrated as usual or longer than that. Then he raised his head, then he prostrated as usual or longer than that, then he sat up." (Using translation from Nasāʾī 1225)
أَنَّ رَسُولَ اللهِ ﷺ انْصَرَفَ مِنَ اثْنَتَيْنِ فَقَالَ لَهُ ذُو الْيَدَيْنِ أَقَصُرَتِ الصَّلَاةُ أَمْ نَسِيتَ يَا رَسُولَ اللهِ؟ فَقَالَ رَسُولُ اللهِ ﷺ «أَصَدَقَ ذُو الْيَدَيْنِ» فَقَالَ النَّاسُ نَعَمْ فَقَامَ رَسُولُ اللهِ ﷺ «فَصَلَّى اثْنَتَيْنِ ثُمَّ سَلَّمَ ثُمَّ كَبَّرَ فَسَجَدَ مِثْلَ سُجُودِهِ أَوْ أَطْوَلَ ثُمَّ رَفَعَ رَأْسَهُ ثُمَّ كَبَّرَ فَسَجَدَ مِثْلَ سُجُودِهِ أَوْ أَطْوَلَ ثُمَّ رَفَعَ»