Praise be to Allah.
Missing first tashahhud
If someone makes a mistake in the first tashahhud , it must be one of two things:
1. He remembers it after he starts to get up, meaning after his thighs leave his calves and before he has stood up fully. In this case, he should sit down and recite the tashahhud , and complete his prayer, then do the prostration of forgetfulness.
2. He remembers it after he has stood up fully, whether he has started to recite or not. In this case, he should not sit back down, because he has separated from the tashahhud completely, as he has now reached the essential part of prayer that follows it. (See: ash-Sharh al-Mumti‘ by Shaykh Ibn ‘Uthaymin (may Allah have mercy on him), 3/131)
How to offer prostrations for forgetfulness if you miss the first tashahhud
What the imam should have done is to do two prostrations for forgetfulness , not just one prostration, because the Prophet (blessings and peace of Allah be upon him) said: “If one of you is unsure concerning his prayer, let him try to work out what is correct and proceed on that basis, then prostrate twice.” (Narrated by al-Bukhari (401) and Muslim (572)
So the prostration of forgetfulness consists of two prostrations, not just one.
Offered only one prostration of forgetfulness: Is prayer valid?
If the worshipper did only one prostration for forgetfulness out of ignorance, he does not have to do anything, and his prayer and the prayer of one who prayed behind him is valid; he comes under the same ruling as one who forgot to do the prostration of forgetfulness. Please see the answer to question no. 257 about one who forgot to recite the first tashahhud and did not do the prostration of forgetfulness.
It says in Daqaiq Uli an-Nuha (1/217):
“Regarding the one who forgets any of the obligatory parts of prayer… out of ignorance of the ruling thereon, in the sense that it did not cross his mind that any scholar said that it is obligatory, is like the one who forgot. So he should do the prostration of forgetfulness if he comes to know of it before its time expires, otherwise he does not have to do it, and his prayer is valid.”
The scholars of the Permanent Committee for Ifta (6/10) said:
“If he deliberately did not do the prostration of forgetfulness, then his prayer is invalid and he must repeat it. If he did not do it because he forgot or was unaware of the ruling, then he does not have to repeat it and his prayer is valid.”
The imam should be alerted to what he made of mistakes, so that he will not make them again.
Can we offer the second sajdah on our own?
Those who were praying behind the imam should have done the second prostration, even if their imam did not do it, because there was something omitted from their prayer.
An-Nawawi (may Allah have mercy on him) said in al-Majmu‘ (4/65):
“If the imam only did one prostration for the prostration of forgetfulness, the one who is praying behind him should do another prostration, assuming that the imam made a mistake. If the imam deliberately did not do the prostration for forgetfulness, or he forgot, the one who was praying behind him should still do it. This is the sound view that was stated [by the scholars], because when the imam made a mistake it caused the prayers of those who were praying behind him to become defective because of his forgetfulness. So if the imam did not compensate for his prayer, the one who was praying behind him should compensate for his own prayer.”
He also said (4/66):
“If the imam makes a mistake in the prayer and does not do the prostration of forgetfulness, then we have noted above that the correct view according to our madhhab is that the one who is praying behind the imam should do the prostration of forgetfulness. This was the view of Malik, al-Awza'i, al-Layth and Abu Thawr; it was narrated from Ahmad, and Ibn al-Mundhir narrated it from Ibn Sirin, al-Hakam and Qatadah. ‘Ata, al-Hasan, an-Nakha‘i, al-Qasim, Hammad ibn Abi Sulaymaan, ath-Thawri, Abu Hanifah, al-Muzani, and Ahmad – according to another report from him – said: He does not have to do the prostration of forgetfulness.”
And Allah knows best.