All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
If a praying person reaches the imaam while he is making sujood in the last rak'ah, then he should immediately join him without delay.
In his book At-Taaj wal-Ikleel, Al-Mawwaaq said, “He should not delay saying the opening takbeerah (commencing the prayer by saying Allaahu Akbar) even if he reaches what is not counted [as a rak’ah].”
An-Nawawi said in Al-Majmoo', “If he reaches the imaam while in sujood or in tashahhud, then he should make the opening takbeerah while he is standing.”
The Fatwa of the Standing Committee reads:
“If a praying person commences the prayer while the imaam is in the final tashahhud, then he should join him in whatever remains as it was reported from the Prophet that he said, 'If one of you commences the prayer while the imaam is in any given position, then he should do what the imaam is doing.' [At-Tirmithi] The Prophet also said, 'When you come to the prayer, there should be tranquility upon you. Pray what remains of the prayer and complete what you have missed.' [Al-Bukhari and Muslim]. Hence, if a praying person commences the prayer with the imaam while the latter is in tashahhud, then he should recite the tashahhud, and when the imaam concludes the prayer by saying salaam, then he should stand to complete his prayer.”
This new person led in prayer should place himself at the left-side of the imaam, then he should complete his prayer in this state. The two persons who are preceded in prayer should not move backward, and the imaam should not move forward during sujood or when sitting down. Indeed, Imaam an-Nawawi clarified this as he said:
“The scholars of our School said, 'If there is an imaam and a person led in prayer says the opening takbeerah while positioning himself to the right of the imaam, and then another person comes and says the opening takbeerah to the left of the imaam, then if there is space in front of the imaam while there is no space behind the two persons led in prayer, then the imaam should move forward; and if there is space behind them while there is no space in front of the imaam, then they should move backward. In case there is space in front of the imaam and there is also space behind them, then he either moves forward or they both move backward.' As regards what is better to do in this case, then there are two opinions; the correct opinion determined by Shaykh Abu Haamid and most of the scholars (of our School) is that it is the two persons led in prayer who should move backward because the imaam is the person to be followed, so he does not move. The second opinion is that the imaam should move forward; this is said by Al-Qaffaal and Al-Qaadhi Abu At-Tayyib because the imaam sees what is in front of him and because it is a movement done by one person, and it is easier compared to a movement done by two persons. This is when the second person led in prayer comes while they are standing in prayer. However, if he comes while they are in tashahhud or in sujood, then there is no moving forward or backward until they stand. Also, there is no difference of opinion that moving forward or backward does not take place until after the second person led in prayer commences the prayer by saying the opening takbeerah, as we have already mentioned, and the author (i.e. Ash-Sheeraazi, in his book Al-Muhaththab) has pointed out to this by saying: then (i.e. after the second person led in prayer commences the prayer by saying the opening takbeerah) the imaam moves forward or they both move backward.”
Allaah knows best.