If the joining is after the Ruku of the fourth Rakat, you will read the entire Salaah in full as normal (after arising when the Imam says the second Salaam). So in this case the Tashahud would fall after two Rakats.
If the joining is before (or during) the Ruku of the fourth Rakat, then the format will be as follows, after arising when the Imam says the second Salaam:
1st Rakat: Thana, Ta'awuz, Tasmia, al-Fatiha, Tasmia (if reciting from beginning of Sura), Sura, Ruku & Sujood
then Tashahud
2nd Rakat: Tasmia, al-Fatiha, Tasmia (if applicable), Sura, Ruku & Sujood
then stand up
3rd Rakat: Tasmia, al-Fatiha (also I believe it is permissible for one to remain silent - best confirmed), Ruku, Sujood, Final Rakat so Tashahud, Salaams.
So in this case your first rakat will consist of Tashahud.
Hope that's clear
Please confirm with scholar though.
Wallahu Aalam
Bookmarks