The prostration of forgetfulness (sujudas-sahu) in Prayer is prescribed for three specific reasons: doing something extra in the Prayer, omitting something, and being uncertain. As for the specific case you mentioned, if the person forgets to do the first tashahhud, he should perform the prostration of forgetfulness because when the Prophet (peace and blessings of be upon him) omitted the first tashahhud he carried on with his Prayer and did not go back and repeat anything, then he did the prostration of forgetfulness before saying the tasleem.
The late Sheikh Ibn `Uthaymeen, a prominent Saudi Muslim scholar (may Allah shower mercy on his soul), said: the prostration of forgetfulness in Prayer is generally prescribed for three reasons:
1. Doing something extra: for example, doing an extra ruku`, prostration, standing or sitting.
2. Omitting something: such as omitting an essential part of the Prayer, or omitting one of the obligatory parts of the Prayer.
3. Being uncertain: such as when a person is not sure how many rak`ahs < span >he has prayed; whether it was three or four.
In the case of doing something extra: if a person deliberately adds something to his Prayer – ruku`, prostrating, standing or sitting, his Prayer becomes invalid, because that means he did not do the Prayer in the manner ordained by Allah the Almighty and His Messenger (peace and blessings be upon him). The Prophet (peace and blessings be upon him) said: “Whoever does an action that is not part of this matter of ours (i.e., Islam), will have it rejected.” (Muslim)
however, if he did something extra by mistake, his Prayer is not invalidated, but he should do the prostration of forgetfulness after saying the tasleem. The evidence for that is the hadith narrated by Abu Hurairah (may Allah be pleased with him) who said that when the Prophet (peace and blessings be upon him) said the tasleem after two rak`ahs in one of the two afternoon Prayers, either Zhuhr Prayer or `Asr Prayer, and they told him about that, he (peace and blessings be upon him) completed the Prayer, then he said the tasleem, and then he prostrated twice (the prostration of forgetfulness). (Al-Bukhari and Muslim)
Moreover, Ibn Mas`ud (may Allah be pleased with him) narrated that the Prophet (peace and blessings be upon him) led them in Zhuhr Prayer and he prayed five rak`ahs. When he had finished it was said to him: “Has something been added to the Prayer?” He asked: “Why are you asking that?” They replied: “You prayed five (rak`ahs).” Therefore, he turned towards the qiblah and prostrated twice. (Al-Bukhari and Muslim)
In the case of omitting something: if a person omits one of the essential parts of the Prayer, one of the following two scenarios must apply:
Either he remembers it be
fore he reaches the same point in the following rak`ah, so he has to go back and do that essential part of the Prayer and all that came after it, or he does not remember it until he reaches the same point in the following rak`ah, in which case the following rak`ah takes the place of the one in which he omitted the essential part, and he should make up for the invali d rak`ah.
In either of these two cases, he should do the prostration of forgetfulness after saying the tasleem.
For example, a man stood up after doing the first prostration of the first rak`ah and did not sit or do the second prostration. When he started to recite the Qur’an he remembered that he had not done the second prostration or sat between the two prostrations. In this case, he should go back and sit as between the two prostrations, then prostrate, then stand up and do all that is left of his prayer. Then he should do the prostration of forgetfulness after saying the tasleem.
An example of the person who did not remember until after he reached the same point in the following rak`ah, is a person who stood up following the first prostration in the first rak`ah and did not do the second prostration or sit between the two prostrations, but he did not remember that until he had sat between the two prostrations in the second rak`ah. In this case, he should make the second rak`ah the first rak`ah, and add another rak`ah to his Prayer, then he should say the tasleem and then do the prostration of forgetfulness.
Another example is omitting an obligatory part of the Prayer. This is when he omits an obligatory part and moves on to the next part of the Prayer. For example, he forgets to say SubhanRabbiyyaAl-‘A`la (Glory be to my Lord Most High) and he does not remember until he has got up from the prostration. In this case, he has mistakenly omitted an obligatory part of the Prayer, so he should carry on with his Prayer then do the prostration of forgetfulness before saying the tasleem. This is because when the Prophet (peace and blessings of be upon him) omitted the first tashahhud he carried on with his prayer and did not go back and repeat anything, then he did the prostration of forgetfulness before saying the tasleem.
In the case of being uncertain: if a person is not sure if he has done something extra or omitted something, for example, he is not sure whether he has prayed three rak`ahs or four, one of the following two scenarios must apply: Either he thinks that one or the other is more likely to be the case, whether it is doing more or omitting something, in which case he should proceed with his Prayer on the basis of what he thinks is more likely to be the case, and complete his Prayer accordingly. Then he should do the prostration of forgetfulness after saying the tasleem; or if neither appears more likely to be the case, so he should proceed on the basis of what is certain, namely the lesser amount, and complete his Prayer accordingly. Then he should do the prostration of forgetfulness before saying the tasleem.
For example, if a person is praying Zhuhr Prayer and he is not sure whether he is praying the third or the fourth rak`ah, but he thinks it is more likely that it is the third, he should pray another rak`ah, then say the tasleem, then do the prostration of forgetfulness.
An example of when neither seems more likely to be the case is when a person is praying Zhuhr Prayer and he is not sure whether he is in the third rak`ah or the fourth, and neither seems more likely to be the case. In that case, he should proceed on the basis of what is certain, which is the lesser amount. Therefore, he should regard it as the third rak`ah, then do another rak`ah and do the prostration of forgetfulness before saying the tasleem.
Thus, it is clear that this should be done before the tasleem if you have omitted one of the obligatory parts of the Prayer or if you are not sure how many rak`ahs you have done, and neither of the two choices seems more likely to be the case. Moreover, it should be done after the tasleem if you have added something extra to the Prayer or if you are not certain but one of the two choices seems more likely to be the case.