Praise be to Allaah.
It is obligatory to make up missed prayers in the proper order, according to the majority of scholars.
Ibn Qudaamah said (al-Mughni, 1/352): In conclusion, it is essential to offer missed prayers in order. This was stated by Ahmad in several placesâ€¦ and a similar view was narrated from al-Nakha'i, al-Zuhri, Rabee'ah, Yahya al-Ansaari, Maalik, al-Layth, Abu Haneefah and Ishaaq.
Al-Shaafa'i said: It is not essential, because one is making up an obligatory prayer that has been missed, so it is not essential to offer them in order, as with fastingâ€¦ Once this is established, then it is essential to offer them in order even if they are many. This was stated by Ahmad.
Maalik and Abu Haneefah said that they do not have to be offered in order if there are more than a day and a night of prayers, because doing that with regard to more than that period would be too difficult. So the obligation is waived, just like making up missed Ramadaan fasts in sequence.
End quote from al-Mughni, 1/352.
From this it may be understood that offering missed prayers should be done in sequence according to the majority of Hanafis, Maalikis and Hanbalis, except that the Hanafis and Maalikis do not say it is obligatory if the prayers of more than one day and one night have been missed.
The way in which the missed prayers are made up in order is to do the missed prayers in the same order as the prescribed prayers. So whoever misses Zuhr and Asr, for example, should pray Zuhr first, then Asr.
But the obligation to do them in order is waived in the case of one who forgets or was ignorant, or if there is the fear that the time for the current prayer will end soon, or if one fears missing out on a prayer in congregation - according to the more correct view.
If a person owes two prayers, Zuhr and Asr for example, and starts with Asr by mistake or because he is unaware that the missed prayers should be offered in order, his prayer is valid.
If he fears that if he starts with the prayers he missed the time for Asr prayer will end, then he should pray Asr first, then pray whatever prayers he owes.
Similarly if he enters the mosque, should he offer the current prayer with the congregation or make up what he has missed first? Ahmad, according to one report which was also favoured by Shaykh al-Islam, was of the view that he does not have to offer the prayers in sequence if he fears that he will miss out on praying with the congregation.
But in this case he should join the congregation with the intention of offering the missed prayer. So if a person has missed Zuhr and he comes to the mosque and they are praying Asr, he can pray with the congregation with the intention of praying Zuhr, and it does not matter if his intention is different from that of the imam. Then he can pray Asr after that.
See al-Sharh al-Mumti', 2/138-144.
And Allaah knows best.