If one, forgetting the first Tashahhud, stands up for the third Rak`ah and starts the recitation of Al-Fatihah, then according to the majority of scholars, he should not return back to the sitting position.
If he does return, knowing that his return is unapproved of, his prayer will be nullified because he has already started another obligatory act. Due to his missing the Wajib (i.e., Tashahhud) he is forced to make the prostrations of forgetfulness. Al-Mugheerah bin Shu`bah quoted the Prophet, peace and blessings be upon him, as saying: “If the Imam stands up after the second Rak`ah, and remembers that he has to sit, before he straightens himself (upright), then he should sit down, and if he has straightened upright, he should not sit and make two prostrations of forgetfulness.”
(Reported by Abu Dawud, No. 1036)
In short, if someone stands up for the third Rak`ah, forgetting the Tashahhud, he is in one of the three situations:
1-He remembers it before standing up straight: then he should return to Tashahhud.
2-He remembers after standing up straight, and before starting the recitation of Al-Fatihah: then it is better for him not to sit, but if he sits his prayer will be deemed valid.
3-He remembers it after starting the recitation of Al-Fatihah: then he is not allowed to return to Tashahhud. (al-Mughni 1/677). These three cases have been deduced from the aforementioned Hadith.”