Q) What is the ruling on someone who wants to join two prayers whilst travelling, offering the two prayers at the time of the first one, knowing that he thinks it most likely that he will reach his city before the time of the second prayer ends? What does he have to do if he arrives whilst the prayer is being offered in the mosque?
A) Praise be to Allaah.
So long as a person is travelling, he may join prayers, even if he is going to arrive in his city before the time of the second obligatory prayer begins, but in this case it is better not to join the prayers, because joining prayers is only to be done when there is a need for it. This man who knows that he will arrive before the time of the second prayer begins does not need to join the prayers. Nevertheless, if he does that, there is nothing wrong with it. If he arrives when the time for the prayer has not yet begun, then he has discharged his obligation and he does not have to pray, because he offered the prayer by joining it with the first prayer. End quote.
Shaykh Muhammad ibn ‘Uthaymeen (may Allaah have mercy on him)
Liqaa’aat al-Baab il-Maftooh (1/203)