Rulings Regarding Prayer- Tashahhud
Among the obligatory acts of prayer is tashahhud, which must be recited in the second and last rak'ahs of all prayers while sitting and when the body is completely still. The words of tashahhud must be recited in correct Arabic:
اشهد ان لا اله الا الله وحده لا شریک له، و اشهد ان محمدا عبده و رسوله، اللهم صل علی محمد و آل محمد
If one doubts whether or not they have recited tashahhud, provided that they have not yet gone in to the next rak'ah, they must recite it. But if one has already gone in to the next rak'ah, they should no longer pay attention to their doubt.
However, if one forgets to recite tashahhud, provided that they recall this prior to the rukū' of the next rak'ah, they must return and perform it, and they must stand up again and recite tasbihāt again. But if they recall not having performed tashahhud in the rukū' of the next rak'ah or after that, their prayer is valid and it is not necessary for them to return; however, they need to perform sajdah al-sahw twice. They’d better perform the Qadā of the tashahhud after the prayer as well.
When one forgets only the salawāt of tashahhud, if they recall this while standing for qiyām in congregational prayer, they must sit down and recite the salawāt and continue the prayer again in order to keep up with the congregational prayer. Then they must perform sajdah al-sahw twice for the extra qiyām once the prayer ends.
But if one is performing prayers by themselves while reciting the salām of the prayer, they must return and recite the salawāt and then recite the salām again, but if they recall after the prayer has ended, they have no obligation and their prayer is valid.