Assalamualaikum ustaz. An imam performs the final tahiyat when it is just the third rakaat. What should a makmum do? Should he stand and signal the imam of the mistake, or stay seated with the imam as he signals that the imam is mistaken?
Alhamdulillah, praise and gratitude to Allah SWT for His countless blessings for us all. Praise and salutations to our beloved Prophet Muhammad PBUH, his family, companions and all those who follow his footsteps until the Last Day.
One of the valid conditions of qudwah (following an imam) is a makmum must follow (mutaba’ah) the actions of the imam. If the makmum contradicts the actions of the imam, whether he preceded or slow for two fi’li (action) requisite, without any reasonable excuse, then the prayer of the makmum is invalid if he doesn’t intend to mufaraqah (separate from the imam). However, if the mukhalafah (contradiction) happens for just one requisite, then it doesn’t invalidate the prayer for it is considered as a little mukhalafah.
The exception for the above ruling is if the imam forgets the fardhu (requisite), for example, if an imam sits for the final tasyahhud in the third rakaat. Syiekh Muhamamd al-Zuhaili explained: “If an imam left a fardhu in prayer, or stand when he is supposed to sit, it is impermissible for the makmum to follow the imam in leaving the act. Whther he left it due to forgetfulness or on purpose. The reason is it is obligatory for a makmum to follow the actions of prayer, while the action performed by the imam is not from the actions of the prayer. The same goes for when an imam purposely leave it, then his prayer is invalid, or it may be that he forgets, then his action is not considered. Thus, the makmum should mufaraqah from the imam and complete his prayer alone.” 
Hence, it can be understood from the above text that it is obligatory for a makmum to separate from following the imam who has left a requisite (rukun). However, it is sunnah for the makmum to remind the imam before mufaraqah by reciting tasbih. Syeikh Muhammad al-Zuhaili said: “If an imam forgets the action (in prayer) and leave it, or want to change it, then it is mustahab (sunnah) for the makmum to recite tasbih to inform the imam.” 
In answering the above question, we would like to state that the makmum should stay standing for the fourth rakaat of the Zohor prayer and it is sunnah to signal the mistake to the imam by reciting tasbih so that he’ll stand. 
If he realized his mistake and stands, then continue praying in the congregational prayer until its completion. However, if the imam didn’t stand up, then it is obligatory for the makmum to set the intention of mufaraqah to separate himself from the imam and complete his prayer alone.
Let us supplicate together:
رَبَّنَا لَا تُؤَاخِذْنَا إِن نَّسِينَا أَوْ أَخْطَأْنَا ۚ رَبَّنَا وَلَا تَحْمِلْ عَلَيْنَا إِصْرًا كَمَا حَمَلْتَهُ عَلَى الَّذِينَ مِن قَبْلِنَا ۚ رَبَّنَا وَلَا تُحَمِّلْنَا مَا لَا طَاقَةَ لَنَا بِهِ ۖ وَاعْفُ عَنَّا وَاغْفِرْ لَنَا وَارْحَمْنَا ۚ أَنتَ مَوْلَانَا فَانصُرْنَا عَلَى الْقَوْمِ الْكَافِرِينَ
“Our Lord! Punish us not if we forget or fall into error. Our Lord! Lay not on us a burden like that which You did lay on those before us. Our Lord! Put not on us a burden greater than we have the strength to bear. Pardon us and grant us forgiveness. Have mercy on us. You are our Protector, and help us against the disbelieving people.”
 If the makmum wanted to signal the mistake when he was sitting briefly before standing for the fourth rakaat, then it is permissible if he sits for not a long time, approximately as long as for sitting between the two prostrations according to Imam Ibn Hajar. While according to Imam Syamsuddin al-Ramli, prolonging the time for when he is sitting is permissible. (See al-Taqrirat al-Sadidah, pg. 248)