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, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
According to the view of the majority of scholars shortening the prayer when travelling is a desired Sunnah and not an obligation as clarified in Fatwa 96715.
As regards whether or not a traveller is obliged to perform the prayer in congregation in the mosque if he hears the call to the prayer, then the view we adopt here in Islamweb is that if he does not find another traveller who would perform the prayer with him in congregation and thereby shortening it, then it is more appropriate for him to perform the prayer in congregation in the mosque. He is not obliged to do so, but this is in order to avoid the difference of opinion because performing the prayer in congregation is an obligation on a traveller and on a resident alike according to some scholars . This is in conformity with the general evidence on the obligation of responding to the call to the prayer. As regards shortening the prayer, then this is a Sunnah and not an obligation.
As regards your friend –the house owner –if he is a resident and in a good health, then he is obliged to perform the prayer in congregation in the mosque, because the congregational prayer is an obligation as we clarified in Fatwa 82264.
In case you both perform the prayer at home, it is permissible for anyone of you to lead the other in prayer, but the house owner has the priority of leading the prayer even if the others whom he leads in prayer are religiously more knowledgeable than him, provided he fulfils the conditions of being an Imaam.
In case you pray behind him, you should complete the prayer, and if you lead the prayer, you may shorten it and when you conclude the prayer he would stand up to complete his prayer.
For more benefit, please refer to Fatwa 95606.