All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
It is permissible for both a resident and a traveller to lead one another in prayer. However, if a resident leads the traveller in prayer, then the traveller must continue the prayer with him as the Prophet said: “The Imaam (leading the prayer) is there to be followed.” Nonetheless, if the traveller leads the prayer and shortens it, the resident is obliged to continue his remaining parts of the normal prayer when the traveller concludes his prayer.
As regards whom amongst them is more deserving to lead the prayer, then An-Nawawi from the Shaafi'i School of jurisprudence and Ibn Al-Muflih from the Hanbali School of jurisprudence stated that it is more proper for the resident to lead the prayer.