Reference: Shumara al-Sunnah, Jhelum
Answer:
There can be three possible scenarios in such a situation:
➊ Offer Maghrib in a corner of the mosque, and then join the congregation of ‘Isha. Whatever part of the prayer he is able to join, he should complete it accordingly.
➋ Join the Imam in the ‘Isha prayer first, and offer Maghrib afterward. If, due to necessity or constraint, the order is disrupted, it is not blameworthy.
﴿رَبَّنَا لَا تُؤَاخِذْنَا إِنْ نَسِينَا أَوْ أَخْطَأْنَا﴾ [البقرة: ٢٨٦]
“Our Lord! Do not take us to task if we forget or make a mistake.”
➌ Wait until one rak‘ah of ‘Isha has passed, then intend Maghrib and join the Imam. He may end the prayer with the Imam’s Taslim. A difference in the intention between the Imam and follower does not invalidate the prayer.
Answer:
There can be three possible scenarios in such a situation:
➊ Offer Maghrib in a corner of the mosque, and then join the congregation of ‘Isha. Whatever part of the prayer he is able to join, he should complete it accordingly.
➋ Join the Imam in the ‘Isha prayer first, and offer Maghrib afterward. If, due to necessity or constraint, the order is disrupted, it is not blameworthy.
﴿رَبَّنَا لَا تُؤَاخِذْنَا إِنْ نَسِينَا أَوْ أَخْطَأْنَا﴾ [البقرة: ٢٨٦]
“Our Lord! Do not take us to task if we forget or make a mistake.”
➌ Wait until one rak‘ah of ‘Isha has passed, then intend Maghrib and join the Imam. He may end the prayer with the Imam’s Taslim. A difference in the intention between the Imam and follower does not invalidate the prayer.