“Most of them hold that if a traveller pronounces the opening takbīr behind a resident imam before the latter gives the closing salām, he becomes bound by the residents’ prayer and must complete it.” (1)
What further indicates that a traveller who prays behind a resident is required to perform the full prayer is the general wording of the Prophet’s ﷺ statement: “The imam has only been appointed to be followed, so do not differ with him. When he pronounces the takbīr, then pronounce the takbīr…” (2) (3)
Fourteenth: Forming the intention to shorten (qasr) or to combine (jamʿ) at the start of the prayer, and maintaining succession between the two combined prayers.
The scholars have differed over whether an intention is a prerequisite for shortening and combining. Shaykh al-Islam Ibn Taymiyyah (may Allah have mercy on him) said: “The majority—such as Mālik and Abū Ḥanīfah—do not require an intention, and this is one of the two opinions in the Ḥanbalī school; it is also what Aḥmad’s own texts imply. The second opinion is that an intention is required; this is the view of al-Shāfiʿī and many Ḥanbalīs, such as al-Khiraqī and others.”