بسم الله الرحمن الرحيم
Shaykh Saalih Al-Luhaydaan حفظه الله was asked:
A traveller came upon a people, whilst he was a traveller and found them praying Asr, they had prayed two units of prayer, he joined with them the (remaining) two units of prayer; does he give the salaams (finish the prayer) or does he complete (4 units)?
Shaykh Saalih Al-Luhaydaan answers:
Rather he completes, the traveller if he joins with the residents his prayer is a residents prayer, that which he reaches of the prayer he prays, and that which he missed of it, he completes.