When a person enters into a congregational prayer while the imam was in Tashahhud, what is the better thing to do for him once the imam says the Salaam? Can he say the salaam and join the second group who are just starting a new congregation, or must he continue with the first prayer by himself though he did not even catch one unit with the imam? May Allah reward you for your service to Islam.
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.
When a person joins the congregational prayer while the imaam is in the final Tashahhud, he should stand up after the imaam says the Salaam and carry on with his prayer. According to some scholars, he earns the reward of prayer in congregation. Imaam An-Nawawi said, “He earns the reward of performing the congregational prayer, yet he will not earn the same reward as the one who joined it from the start. This is the correct view (according to the Shaafi‘i School of Fiqh).” [Al-Majmoo']
As for cutting short this prayer – after joining it – it is impermissible because it cuts the obligatory prayer short without a necessity. Ar-Rawdh Al-Murbi' (a Hanbali book) with its Haashiyah reads:
“It is prohibited to leave the obligatory prayer without an excuse. Al-Majd and others said, ‘We do not know of any scholarly difference of opinion in this regard.’ The author of Al-Furoo‘ said, ‘Whoever starts carrying out an obligation is Muwassa' (flexible, i.e. may be delayed), such as making up for the missed fast days of Ramadhaan, performing the prayer in the beginning of its prescribed time, fulfilling a vow that is not bound by a fixed time frame, or paying an expiation – if we said that it is allowed to delay carrying out that obligation – it is prohibited for him to leave it without an excuse in accordance with the other three Schools of Fiqh.’”
However, if he enters the mosque and finds the imaam in the final Tashahhud and there is a group of worshippers who are about to start a new congregational prayer, it is better for him to wait and join the new congregation. This is the opinion of the Shaafiʻis and the one held as preponderant by Ibn Taymiyyah as we have previously underlined in fatwa 86653.
Allah knows best.
You can search for fatwa through many choices