The Sunnah is to remind the Imam by saying: Subhan Allah
Question :
I prayed behind the Imam in the 'Asr prayer, and he neglected the final Tashahhud and stood up to pray a fifth Rak'ah, although he was made aware of it by someone saying: Al-Hamdu Lillah, he did not return (to a sitting position) and continued until he performed the Tashahhud and made the Taslim. But most of the worshippers did not follow him and they waited until he made the Taslim and made it with him. Then he realized this and performed the prostration of forgetfulness. What is the ruling on our saying: Al-Hamdu Lillah", and also our not standing with him? I request an explanation.
Answer:
If the Imam stands up for an extra Rak'ah or sits when he should not sit, the Sunnah for those being led in prayer is to alert him by saying: Subhan Allah, because this is what has come to us from the Sunnah, in the words of the Prophet:
If something befalls you in your prayers, the men should say: Subhan Allah and the women should clap.
This is what is well known among the people, as opposed to saying: Al-Hamdu Lillah. And it is incumbent upon the one led in prayer not to follow the Imam when he prays extra or less; instead, he should sit during the extra and if the Imam prostrates due to forgetfulness, he should prostrate with him and then make the Taslim with him. As for when he prays less, the one behind the Imam must stand up and pray the remainder, if he is sure that the Imam has forgotten it. And whoever stood up with the Imam to pray the extra Rak'ah in ignorance of the fact that it is extra, or in ignorance of the Islamic ruling, his prayer is correct. Likewise the one who sits with him when he prays less than the required number of Rak'ahs, due to ignorance or forgetfulness, his prayer is correct and he must complete his prayer, if he remembers it soon afterwards or someone reminds him. However, if some time has passed, then he must repeat the whole prayer. Likewise, if the Imam forgets and sits without completing the prayer and no one reminds him, or he is reminded, but he is determined, then he remembers that he has made a mistake after the Taslim, he should complete his prayer and those who followed him should complete their prayer and he must perform the prostration of forgetfulness. But if a long time passes without him making up what he missed, he must repeat the whole prayer and so must those who followed him. And Allah is the Granter of success.
Source:
Ibn Baz
Fatawa Islamiyah, Vol. 2 Pages 273-274-275