ANSWER:

The prayer was invalid. 

The Rakah you prayed with the imam was your first. This means that after his salam, you should have prayed one more Rakah and sat for the tashahud as it was your second. And then you complete your 3rd and 4th Rakah.

I joined at fourth rak’ah with imam at ‘Asr prayer and considered it as my fourth rak’ah as well. Then I followed the imam till salam and after his salam, I stood up and firstly prayed the two rak’ahs as I pray usually then I sat for tashahud and finally prayed my third rak’ah, then I sat again and concluded my prayer after tashahud, darud etc and salaam. Is my prayer ok?

Prayer |