He has an exam that will cover the time of ‘Asr and Maghrib – how should he pray?
If the matter is as you describe, then these ten minutes are enough for you to pray, and it is not essential that there be a place that is set aside for prayer, rather you may pray in any clean place, because the Prophet SAWS (peace and blessings of Allaah be upon him) said: “…the earth has been made pure, a means of purification and a place of prostration, so wherever a man is when the time for prayer comes, let him pray.” Narrated by al-Bukhaari (335) and Muslim (521).
If you encounter any difficulty in praying during these ten minutes because you are preoccupied with the exam, or because the time is too tight, then it is permissible for you to join two prayers, so join ‘Asr with Zuhr at the time of Zuhr, and join Maghrib with ‘Isha’ at the time of ‘Isha’.
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) was asked: Sometimes the time for classes atschool comes before the time for prayer, i.e. at twelve for Zuhr and at four-thirty for ‘Asr, and I cannot pray at school because there is no place that is suitable for prayer. Thus I am forced to offer a number of obligatory prayers together at the same time, and sometimes it is more than three obligatory prayers at once. What is the ruling on my prayer? Please advise me, may Allaah reward you with good.
He replied: With regard to joining two prayers that may be joined, there is nothing wrong with that in this case, because it is necessary, such as joining Zuhr and ‘Asr, and Maghrib and ‘Isha’. As for joining ‘Asr and Maghrib, for example, that is not permissible because it is not permissible to delay a prayer beyond its time under any circumstances. Based on that, in this case, if she is afraid that the time for the present prayer that cannot be joined with the following prayer will end, then she should pray it in whatever way she can. So if, for example, she is going to school at the time of ‘Asr, and she cannot pray ‘Asr there, then she should join it with Zuhr at the time of Zuhr, then go to school having done what is required of her. To sum up, it is not permissible for a woman or anyone else to join two prayers that it is not permitted to join, rather one may only join two prayers that it is permitted to join, such as joining Zuhr and ‘Asr, at the time of the earlier or later prayer, and joining Maghrib and ‘Isha’ at the time of the earlier or later prayer, when there is a need for that. End quote from Fataawa Noor al-Darb.
We ask Allaah to help you to do all that is good.
And Allaah knows best.