Is it permissible for a makmum who is performing qasar to follow an imam who is performing tamam prayer?
Allah SWT states:
وَإِذَا ضَرَبْتُمْ فِي الْأَرْضِ فَلَيْسَ عَلَيْكُمْ جُنَاحٌ أَن تَقْصُرُوا مِنَ الصَّلَاةِ
“And when you travel throughout the land, there is no blame upon you for shortening the prayer,” 
From Ya’la bin Umayyah, he said:
قُلْتُ لِعُمَرَ بْنِ الْخَطَّابِ (لَيْسَ عَلَيْكُمْ جُنَاحٌ أَنْ تَقْصُرُوا مِنَ الصَّلاَةِ إِنْ خِفْتُمْ أَنْ يَفْتِنَكُمُ الَّذِينَ كَفَرُوا) فَقَدْ أَمِنَ النَّاسُ؟ فَقَالَ: عَجِبْتُ مِمَّا عَجِبْتَ مِنْهُ فَسَأَلْتُ رَسُولَ اللَّهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ عَنْ ذَلِكَ. فَقَالَ: صَدَقَةٌ تَصَدَّقَ اللَّهُ بِهَا عَلَيْكُمْ فَاقْبَلُوا صَدَقَتَهُ
“I said to ‘Umar bin Al-Khattab: ‘There is no sin on you if you shorten salah and if you fear that the disbelievers may put you in trial (attack you). But now the people are safe.’ ‘Umar said: ‘I wondered the same thing, so I asked the Messenger of Allah (ﷺ) about that and he said: This is a favour from Allah (SWT) to you, so accept His favour.” 
Imam al-Nawawi emphasized the condition to shorten one’s prayer (qasar) is to not follow an imam who is performing the full prayer (tamam). If a person follows an imam who performs tamam (even for a second), then it is obligatory for him to perform the prayer in full. 
The evidence is a narration from Imam Ahmad from Ibn Abbas RA, that he was asked: “Why is it when a traveller perform the prayer two rakaat when he is alone and four rakaat when he follows an imam who is a resident there?” Ibn Abbas answered: “Such is the sunnah.” 
Syeikh Prof Dr Muhammad Al-Zuhaili said: “If a traveller follows an imam who is a resident, then it is the custom to perform the full prayer. The reason is it is an obligatory prayer that must be fulfilled.” He further said: “If [the traveller] follows an imam who is also a traveller and he doesn’t know the intention of the imam [whether he is going to pray tamam or qasar], then he can bind his intention with the imam. This is through: “If he [the imam] perform qasar then so will I and if he performed the full prayer then so will I.”
According to the most sahih opinion, the binding is valid. Then, if he prayed full, he should also pray full and if the imam performs qasar, then, he’ll also perform qasar. The reason is the apparent situation for a traveller is to perform qasar. 
To conclude, it is impermissible for those who are praying qasar to follow an imam who performs the full prayer. It is best to follow the imam by binding his intention with the intention of the imam if he doesn’t know the intention of the imam if both of them are travellers. If the intention of the imam is known, then it is sunnah to pray full with the imam. Wallahu a’lam.
 Narrated by Muslim, no. 686
 Al-Majmu’ Sharh al-Muhazzab, 4/356.
 Al-Mu’tamad fi al-Fiqh Al-Shafi’i, 1/475