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 is His slave and Messenger.
If the Imam appointed someone else who is preceded in prayer [to lead and continue the prayer]; in that case, this person who is preceded completes the prayer with the congregation in the same manner as the prayer of the first Imam, as if he [the first Imam] had not come out (of the prayer). When he completes the prayer according to the pattern of the first Imam, he gets up to make up for what he had missed. The congregation can choose between saying the Salaam when he gets up to make up for what he had missed or wait for him [until he finishes] to say the Salaam with him, according to the view of the Shafi’i and Hanbali Schools of Jurisprudence.
Imam An-Nawawi said in Al-Majmoo’: “If the Imam appoints a person who is preceded in prayer (to complete the prayer) he must observe the Imam’s order, so he sits where the Imam sits and stands where he stands, exactly as he would have done if the Imam had not left the prayer. […] When the Imam’s prayer is complete, he stands up to make up for what he had missed. The congregation praying behind have the option either they separate from him if they wish, and say Salaam, and their prayer is valid without disagreement due to necessity, or they stay sitting [in the Tashahhud position] until they say Salaam at the same time with him. This is all if the person who was preceded in prayer knows the Imam’s prayer pattern and what is left of the prayer. In case he does not know, there are two opinions…… Sheikh Abu Ali said (the most correct of them) is the permissibility. […] Our companions said that based on this, the person who was preceded in prayer watches over the congregation when he completes the Rak’ah; if he notices that they are about to stand, he stands with them, otherwise, he sits. Al-Baghawi said: ‘It does not prevent the person appointed by the Imam [to continue the prayer] to consent with other praying people signaling to him, just as if the Imam had told him that the remainder of the prayer is such and such.” [End of quote]
The Maliki School of jurisprudence is of the view that if he completes the prayer of the Imam, he indicates to them to remain sitting until he completes his prayer, then he says the Salaam [to conclude the prayer], and they say the Salaam along with him.
However, the Hanafi School of jurisprudence is of the opinion that when the one who is preceded in prayer completes the prayer of the Imam, he appoints one of those who has caught up with the entire prayer with the Imam in order to say Salaam to conclude the prayer.
Allah knows best.