All perfect praise be to Allaah, the Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
In the case which you mentioned above, if you are unable to perform the Maghrib prayer at its prescribed fixed time while observing its conditions and pillars, then you may intend at the time of Maghrib to combine the Maghrib with ‘Ishaa’ at the time of ‘Ishaa’; as many scholars are of the view that it is permissible to combine the two prayers for a need. For more benefit, please refer to Fataawa 82828 and 99903.
Therefore, you may act according to this opinion if you need to do so. Also, you may perform the Maghrib prayer on the bus according to your ability, but it is better in order to be on the safe side to make up the Maghrib prayer later.
Allaah Knows best.