Wa `alaykum As-Salamu waRahmatullahi wa Barakatuh.
If you find the imam praying `Isha’, you should join him in `Isha’ – even if you haven’t prayed Maghrib. You should pray Maghrib later: after you complete `Isha’ with the Imam.
We don’t have precedent for anyone joining `Isha’ with the intention of praying Maghrib; we have precedents for someone praying `Isha’ with the intention of Fard and then repeating it as Imam in the congregation while leading another group who didn’t pray `Isha’. We have reports from Mu`adh b. Jabal that he would pray `Isha’ behind the Prophet in Madinah. Then he would head to Quba’ where he would lead `Isha’ for the people of Quba’.
Based on the above precedent, scholars rule that one is allowed to join the imam with a different intention in particular cases. For instance, one may pray with the imam praying `Asr with the intention of Zhuhr; likewise one may join the imam praying Taraweeh with the intention of praying `Isha’ – as long he stands up and complete the remaining two Rak`ahs. Also, a traveler can lead Zhuhr or `Asr or `Isha’ shortening them, while the locals following him should complete the Rak’ahs after him.
We don’t have any precedent, however, for someone joining the imam in Isha with the intention of praying Maghrib; since Maghrib is only three Rak`ahs, one would end up breaking the structure of prayer by his action.
Therefore, you are advised in this case to join the imam with the intention of `Isha’ and makeup Maghrib later.
Almighty Allah knows best.
Views expressed by hosts/guests on this program (live dialogue, Facebook sessions, etc.) are their own and their appearance on the program does not imply an endorsement of them or any entity they represent.