Most of the people of knowledge are of the opinion that it is permissible to combine two prayers during the time of either one of them while travelling, regardless of whether the person is actually on the road or has stopped at a place for some time.
Mu’azh reports that while the Prophet was at Tabuk and the sun had passed the meridian, the Prophet sallallahu alehi wasallam combined the zuhr and ‘asr prayers before he started his journey. If he started his journey before the sun passed its meridian, he would delay the zuhr prayer until the time when he stopped for the ‘asr prayer. He would do likewise for the maghrib prayer. If the sun set before he began his journey, he would combine the maghrib and ‘isha prayers [at that time]. If he began a journey before the sun had set, he would then combine them at the time of ‘isha. This is related by Abu Dawud and at-Tirmizhi who call it hasan.
Kuraib reported that Ibn ‘Abbas said: “Shall I not inform you of the salah of the Prophet sallallahu alehi wasallam during a journey?” We said: “Certainly.” He said: “If the sun passed its meridian while he stopped, he would combine the zuhr and ‘asr prayers before remounting [i.e., moving on]. If the sun had not passed its meridian while he had stopped [i.e., before breaking camp], he would travel until the time of the ‘asr prayer and then he would combine the zuhr and ‘asr prayers. If the sun set while he had stopped, he would combine the magrib and ‘isha prayers. If that did not occur while he had stopped, he would ride until the ‘isha time and then combine them.” This is related by Ahmad.
Ash-Shaf’i has something similar in his Musnad, namely that when he [the Prophet] set out to travel before the sun passed its meridian, he delayed the zuhr prayer and combine it with the ‘asr during the time of the ‘asr salah. Al-Baihaqi recorded it with a good chain and he says: “To combine the two prayers due to travelling is something that is well-known and was practiced by the companions of the Prophet sallallahu alehi wasallam and those who followed them.”
Imam Malik records in al-Muwatta’ from Mu’azh that the Prophet sallallahu alehi wasallam delayed his salah one day during the battle of Tabuk and then went and prayed the zuhr and ‘asr prayers together. Then he returned and went back again and said the maghrib and ‘isha prayers together.
Commenting on this report, ash-Shaf’i says: “His statement, ‘then he returned and left again,’ only refers to a situation where the Prophet was staying in a certain place [i.e., he was not travelling from one site to another].”
Ibn Qudamah mentions the preceding hadith and writes in al-Mughni: “Ibn ‘Abdul-Barr said: ‘That hadith is sahih and its chain is confirmed. The people who are familiar with the life history of the Prophet say that the battle of Tabuk took place in the ninth year of the hijrah. This hadith is a clear proof and the strongest evidence against those who claim that one can only combine the prayers while one is actually moving from one site to another as the Prophet was settled and was not travelling since the Prophet was staying in his tent and would come out and combine two prayers and then return to his tent. Muslim recorded this hadith in his Sahih and stated: ‘He would pray the zuhr and ‘asr together and the maghrib and ‘isha together. One must follow this hadith as it is confirmed [to be authentic] and it is a clear statement on this rule and there is nothing which contradicts it. The permission to combine the salah is a concession for anyone who is travelling but it is by no means confined to just those times when the person is actually on the road [i.e., travelling from one place to another]. The same is the case for shortening the salah and for wiping over the socks, but it is best to delay it.'”: Having the intention to combine is not a condition for combining or shortening the salah. Ibn Taimiyyah holds: “That is the position of the majority of the scholars. When the Prophet combined the salah with his companions or shortened the salah with them, he never ordered any of them to make the intention for combining or shortening the salah. In fact, when he left Medinah for Makkah, he prayed two rak’at without combining the salah, and then he prayed the zuhr prayer at ‘Arafa without telling the people that he intended to pray the ‘asr right afterward, next he prayed the ‘asr with them and they did not have the intention to combine their prayers, and in that combination he prayed the latter salah early. When he went from Medinah, he led the people in the ‘asr salah at Zhul-Halifah and he did not order them to make the intention to shorten the salah.”: Concerning offering the two combined prayers right after each other, Ibn Taimiyyah writes: “The correct opinion is that it is not a necessary condition to do so under any circumstances, neither during the time of the first salah nor during the time of the latter salah. There is no such limit in the shari’ah and doing so would defeat the purpose of the concession [i.e., permission to combine the two salah].” Ash-Shaf’i says: “It is quite permissible for a person to pray the maghrib in his house with the intention of combining the prayers and then go to the mosque to pray the ‘isha.” A similar statement has been related from Ahmad.