The World Federation One Stop Fiqh

Ruling 1432

With regard to someone who is one rakʿah behind the imam, it is better that when the imam says tashahhud of the last rakʿah, he should sit [in a squatted position] such that his fingers and the balls of his feet are on the ground and his knees are off the ground, and he should wait until the imam has said the salām of the prayer and then stand up. And if at that point he wants to make an intention of performing the prayer on his own, there is no problem.