If a traveler performs Salah (prayer) behind a resident Imam, should he make Taslim (salutation of peace ending the Prayer) after two Rak`ahs (units of prayer) or what should he do?
If a person who is on a journey performs Salah behind a resident Imam, he has to complete his Salah as four Rak`ahs. This is according to the Sunnah of the Prophet (peace be upon him). Moreover, following the Imam is an obligation while shortening the four-Rak`ah Salah to two Rak`ahs is a Sunnah and not an obligation according to the soundest opinion of scholars. This is also supported by what was done by the Companions (may Allah be pleased with him) when they performed Salah as four Rak`ah behind
Mina during Hajj. This is because he completed his Salah. They knew that by doing so, they are following the teachings of the Prophet (peace be upon him) as following the Imam is an obligation.
Muslim reported on the authority
Ibn `Abbas (may Allah be pleased with him) that it was said to him, "Why do we perform the four-Rak`ah Salah as four Rak`ahs when we are behind the Imam and perform them as two Rak`ahs when we perform them in our tents?" He said, "This is the Sunnah."May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.