One day I was travelling and I went to the Masjid to pray Asr. Because I was late to the congregation, I caught only the last Raka'h. After the Imam said the salaam I got up and pray only 1 more Raka'h. Was my prayer valid or should I have prayed 3 more Raka'h?
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. We ask Allaah to exalt his mention as well as that of his family and all his companions.
You should have prayed three more Raka'h after the Imaam concluded to complete your prayer. If a traveller prays behind a local person, he has to complete the prayer whether he prayed the whole prayer with the Imaam or missed parts of it. However, some jurists are of the view that if a person joins the prayer after the last bowing of the last unit of the prayer, then he can shorten his prayer in this case. This does not apply to your case as you prayed one whole unit with the Imaam. Therefore, you have to make up that prayer.
Allaah knows best.
You can search for fatwa through many choices