The World Federation One Stop Fiqh

Ruling 747

If a person doubts during the ʿishāʾ prayer after reaching the rukūʿ of the fourth rakʿah whether he has performed the maghrib prayer or not, he must complete the prayer and after that perform the maghrib prayer provided that there is enough time remaining to do so.