A resident who joined the traveller imam from the start completes the two outstanding rak‘ahs after the imam gives salam. In Hanafi reasoning this follower is treated as a lahiq for those remaining rak‘ahs, with different recitation rules from a latecomer who missed the imam’s early units.
The statement “Complete your prayer, for we are travellers” makes the difference in obligation clear to the followers.