Rulings on Joining the Congregational Prayer Late
Question

I want to know in detail the rulings for the one who is late for the congregational prayer.
Praise be to Allah.Who is considered late for prayer?
It says in Al-Mawsu`ah Al-Fiqhiyyah (3353):
“The one who is late for the congregational prayer is the one who comes when the Imam has already done all or some of the Rak`ahs of the prayer.”
Rulings related to joining the congregational prayer late
Some of the rulings concerning the one who is late for the congregational prayer:

It is recommended for the one who is late for the congregational prayer to come to the mosque in a calm and dignified manner. He should understand that whatever he catches up with of the prayer with the Imam is regarded as the start of his prayer. So if the one who is late for the prayer catches up with the Imam in the second Rak`ah of Maghrib prayer – for example – this Rak`ah is regarded as the second Rak`ah for the Imam and the first Rak`ah for him.

The evidence for these two rulings is the words of the Prophet (blessings and peace of Allah be upon him): “When you hear the Iqamah, then walk to the prayer and be calm and dignified. Do not rush, and whatever you catch up with, pray, and whatever you miss, complete it.” (Narrated by Al-Bukhari, 600)
Some of the scholars made an exception for the one who fears that he will miss out on the congregational prayer altogether; he may hurry somewhat, so as to catch up with the congregational prayer.

If the one who is late for the prayer catches up with it when the Imam is bowing, then he must say the Takbirat Al-Ihram (opening Takbir, which is said to commence the prayer) whilst standing. If he says it whilst bending forward, his prayer is not valid.

An-Nawawi (may Allah have mercy on him) said:
“It is obligatory to say the Takbierat Al-Ihram whilst standing. This also applies to one who is late for the prayer and catches up with the Imam when he is already bowing. His Takbierat Al-Ihram must be enunciated properly whilst he is standing; if he pronounces any letter of it when he is not standing, he has not started his prayer, and there is no difference of scholarly opinion concerning that.” (Al-Majmu`, 3/296)

If the one who is late for the prayer comes when the Imam is bowing, then to be on the safe side he should say Takbir twice: the first one for Takbirat Al-Ihram, and the second one for the Takbir of bowing. If he says Takbirat Al-Ihram only, then bows without saying the Takbir for bowing, that is acceptable according to the correct scholarly opinion.

Shaykh Ibn Baz (may Allah have mercy on him) was asked:
If a worshipper joins the prayer when the Imam is bowing, should he say the opening Takbir and the Takbir for bowing, or should he say just one Takbir and then bow?
Answer:
“It is preferable and more prudent for him to say two Takbirs: one for Takbirat Al-Ihram, which is an essential part of the prayer and must be said when he is standing, and the second is the Takbir of bowing, which he should say as he is bending down forRuku`. If he is afraid of missing the Rak`ah, then Takbirat Al-Ihram is sufficient according to the more correct of the two scholarly opinions, because they are two acts of worship to be done at the same time, so doing that which is more important will suffice for that which is less important, and this Rak`ah will be valid, according to most of the scholars.” (Majmu` Fatawa Ibn Baz, 11/245)

If the worshipper joins the prayer when the Imam is bowing, this Rak`ah will count as valid, even if he does not say the Tasbih until after the Imam has stood up.
If the one who is late for the prayer does not know whether he caught up with Ruku` (bowing) with the Imam or not, then in this case he should act on the basis of what he thinks most likely to be the case. If he thinks it most likely that he caught up with the Imam when he was bowing, then he has caught up with the Rak`ah;  if he thinks it most likely that he did not catch up with him when he was bowing, then he is not regarded as having caught up with the Rak`ah.

It says in Ash-Sharh Al-Mumti‘ (3/383) by Shaykh Ibn ‘Uthaymin (may Allah have mercy on him):
“Question: Someone comes when the Imam is bowing, and he says Takbirat Al-Ihram then bows, then he is not sure whether he caught up with the Imam in Ruku‘ or the Imam stood up before he caught up with him.
According to the author’s view, this Rak`ah is not to be counted as valid, because this person is not sure whether he caught up with it (the Rak`ah) or not. So he should proceed on the basis of what is certain, which is that he did not catch up with it, therefore this Rak`ah does not count.
According to the second view – which is that he should proceed on the basis of what he thinks most likely to be the case – we say: Do you think it most likely that you caught up with the Imam when he was bowing, or not? If he says: Yes, I think it most likely that I caught up with him when he was bowing, then we say: This Rak`ah counts in your case. But if he says: I think it most likely that I did not catch up with it, then we say: Do not count this Rak`ah, and complete your prayer (on that basis).
If he says: I am not sure, but I do not think it most likely that I caught up with it, then we say: Proceed on the basis of what is certain; do not count this Rak`ah, and complete your prayer.”

It is permissible for the one who is late for the prayer to pray behind the row on his own, if he cannot find space in the row in front of him.
If the Imam does an extra Rak`ah by mistake, should the one who was late for the prayer count that extra Rak`ah (as part of his own prayer)? Concerning this issue there is a difference of opinion among the scholars.

Shaykh Ibn `Uthaymin (may Allah have mercy on him) was asked:
If the Imam prays five Rak`ahs and someone joins the prayer late in the second Rak`ah, should he say the Salam with the Imam or add a Rak`ah (after the Imam has finished)?
He (may Allah have mercy on him) replied:
“The scholars differed concerning this issue. Some of the scholars said that when the Imam who prayed five says the Salam, the one who was late for the prayer must do another Rak`ah , so that he will have prayed five as his Imam did. The evidence for that is the words of the Prophet (blessings and peace of Allah be upon him): “Whatever you catch up with, pray; and whatever you have missed, complete it.” They (the scholars) said: This man missed a Rak`ah (with the Imam), so he must do it.
But the more correct view is that it is not permissible for him to do a fifth Rak`ah ; rather he should say the Salam with the Imam in this case, because the Imam did the fifth Rak`ah with a valid excuse (which is that he forgot), but this man has no excuse after knowing that he has prayed four Rak`ahs. Therefore it is not permissible for him to add something to the prayer.
The response concerning the words of the Prophet (blessings and peace of Allah be upon him), “and whatever you have missed, complete it” is to note that the word “complete it” indicates that because of what he has missed, his prayer is lacking, and if he had prayed four Rak`ahs with the Imam, his prayer would not be lacking. This is the answer to the one who quotes this Hadith. And Allah knows best.” (Majmu‘ Fatawa Ibn `Uthaymin, 20/14)

If the Imam does the prostration of forgetfulness (Sujud As-Sahw) before the Salam, then the one who was late for the prayer should prostrate with him , whether he was with the Imam when he made that mistake or he joined the prayer after the Imam made the mistake. But if the Imam does the prostration of forgetfulness after the Salam, then the one who was late for the prayer should not follow his Imam in that prostration, because it is not possible for him to follow the Imam in this case. 
The one who was late for the prayer is not regarded as having caught up with the prayer in congregation unless he caught up with at least one Rak`ah of the prayer. One can only catch up with the Rak`ah by catching up with Ruku‘ (bowing).

It says in Fatawa Al-Lajnah Ad-Da’imah (vol. 2, 6/225):
“The one who was late for the prayer has not caught up with the prayer in congregation unless he catches up with one Rak`ah, according to the correct view, because of the Hadith: “Whoever catches up with a Rak`ah of the prayer has caught up with the prayer.” (Narrated by Muslim). One catches up with the Rak`ah by catching up with Ruku‘ (bowing).”

If the one who is late for the prayer comes after the final Ruku‘, then it is still better for him to join the Imam, and not look for another congregation.

It says in Fatawa Al-Lajnah Ad-Da’imah (vol. 2, 6/225):
“If the Muslim comes after the final Ruku‘, it is better for him to join the Imam in whatever he has caught up with , because of the general meaning of the words of the Prophet (blessings and peace of Allah be upon him): “When you come to the prayer, then come in a tranquil manner, then whatever you catch up with, pray, and whatever you have missed, complete it.” This includes both what comes before the final Ruku‘ and what comes after it.”

The one who was late for the prayer is not regarded as having caught up with Jumu‘ah if he misses Ruku` (bowing) in the second Rak`ah. If he comes after the Imam has stood up from bowing in the second Rak`ah of Jumu`ah prayer, then he has missed Jumu`ah . So he should join the Imam (for the remainder of the prayer), then complete it as Thuhr [with four Rak`ahs] after the Imam says the Salam. 
In order to be on the safe side, the one who was late for the prayer should not stand up to make up what he missed of the prayer until after the Imam has finished saying the second Taslimah .

And Allah knows best.