Allah’s Messenger (ﷺ) once led us in a prayer and offered two rak`at and got up (for the third rak`a) without sitting (after the second rak`a). The people also got up with him, and when he was about to finish his prayer, we waited for him to finish the prayer with Taslim but he said Takbir before Taslim and performed two prostrations while sitting and then finished the prayer with Taslim.
Sahih al-Bukhari 1224 Book 22, Hadith 1
USC-MSA Vol. 2, Book 22, Hadith 315
Allah’s Messenger (ﷺ) got up after the second rak`a of the Zuhr prayer without sitting in between (the second and the third rak`at). When he finished the prayer he performed two prostrations (of Sahu) and then finished the prayer with Taslim.
Sahih al-Bukhari 1225 Book 22, Hadith 2
In the name of Allah, We praise Him, seek His help and ask for His forgiveness. Whoever Allah guides none can misguide, and whoever He allows to fall astray, none can guide them aright. We bear witness that there is none worthy of worship but Allah Alone, and we bear witness that Muhammad (saws) is His slave-servant and the seal of His Messengers.
There are two ways prescribed in the authentic narrations on how the Messenger of Allah (saws) performed the Sajdah-Sahoo and both are acceptable. Abu Sa’id al-Khudri reported that the Messenger of Allah (saws) did two sujoods before the tasleem, and in the narration of Dhul-Yadain narrated by Abu Hurairah, it is recorded that the Prophet (saws) made the two prostrations after the tasleem.
The way to perform the Sajdah-Sahoo (or Sajdahs of forgetfulness) is to go into sajdah and glorify Allah, then sit and make supplication to Allah, then again go into sajdah and glorify Allah, and then perform the tasleems on either side.
This whole set of actions related above is called sajdah-sahoo and is to be done only once at the end of the prayer if the person has made an unintentional mistake/s in their prayer.
Sajdah-Sahoo 1 (before the tasleem):
If one realizes one has made an error in prayer during the prayer, one should complete the prayer to the best of his conviction and recite the tashahud; just before the tasleems of either side at the end of the tashahud, one should make the two sajdahs for sajdah-sahoo and then perform the tasleems on either side; thus reciting the tashahud only once in their prayer.
Sajdah-Sahoo 2 (after the tasleem):
If one realizes that one has made an error in prayer after one has already completed ones prayer and performed the tasleems; then immediately after realization of the error, one should complete the rakahs they had forgotten in prayer, recite the final tashahud again, make the two sajdahs for sajdah-sahoo, and then again perform the tasleems on either side; thus reciting the tashahud twice in their prayers