I prayed with the Imam and he forgot the second prostration in one of the Raka‘hs. Knowing that this was the Fajr prayer, what should those being led and the Imam do if this was remembered after the end of the prayer and the people had already departed?
All perfect praise be to Allah, the Lord of the Worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
The prostration is one of the pillars of prayer that is not remedied by sujood as-sahw (the two prostrations of forgetfulness) if it was left unintentionally. If it was left intentionally, then the prayer becomes invalidated the moment it is omitted.
Therefore, if the imam forgot the prostration, then it was the duty of the one being led to alert him. If he was not alerted, then the one being led must perform the prostration and his prayer is valid. If he followed him in omitting the prostration, then his prayer is invalid.
If the Imam did not remember that he forgot the prostration until after a long period had passed, like after the people dispersed and exited the Masjid, then his prayer is invalid and he must repeat it.
Allah knows best.
You can search for fatwa through many choices