Question :
I caught up with the Maghreb congregation in the last Rak`ah, so I made up for the ones I have missed. However, I`m not sure whether my making up of those Rak`ahs was valid or not. How should the missed Rak`ahs be made up for?
The Answer :
All perfect praise be to Allah The Lord of the Worlds and may His peace and blessings be upon our Prophet Mohammad and upon all his family and companions.
Whoever managed to catch up with the Imam before the latter got up from Ruku of the last Rak`ah of Maghreb prayer, then he has attained the first Rak`ah of his own prayer; thus, he should complete that Rak`ah with the Imam, but he has two Rak`ahs left. Once the Imam makes the final Tasleem, that person should get up to make one Rak`ah, then sits for the middle Tashahud. At this time, he would have completed his second Rak`ah. Afterwards, he gets up and offers the third Rak`ah, then sits for Tashahud and Tasleem. And Allah Knows Best.