Praise be to Allah.
If a worshipper catches up with the prayer when the imam is in the posture of rukoo‘ [bowing], and says the opening takbeer whilst standing, then bows before the imam stands up, then he has caught up with the rak‘ah. But if the imam stands up before he bows, then he has missed the rak‘ah.
If he is not sure whether the imam stood up before he bowed or not, then he has missed the rak‘ah.
The takbeer before bowing is waived in this case, even according to those who say that the takbeer when moving from one posture to another in the prayer is obligatory, namely the Hanbalis.
It says in Kashshaaf al-Qinaa‘ (1/460):
If someone catches up with bowing with the imam before the imam lifts his head from bowing, so that the worshipper is able to bow properly, before the imam moves from the posture of bowing as much as is regarded as exiting the posture, and he does not doubt that he has caught up with the imam when he was bowing, then he has caught up with the rak‘ah, even if he was not able to pause with the imam in his rukoo‘, so long as he himself – that is the one who joined the prayer late – paused and then caught up with the imam. That is because of the marfoo‘ hadith of Abu Hurayrah: “If you come to the prayer when we are prostrating, then prostrate, but do not count it as anything. Whoever catches up with rukoo‘ (bowing) has caught up with the rak‘ah.” Narrated by Abu Daawood with a hasan isnaad.
Because he has not omitted any essential part of the prayer except standing, but he did that with the opening takbeer, then he has caught up with the imam for the rest of the rak‘ah. If he was not sure whether he caught up with the imam when he was in the posture of bowing or not, he should not count that as having caught up with the rak‘ah, and he should do the prostration of forgetfulness, which has been discussed above in the relevant chapter.
If he says takbeer when the imam is in the posture of bowing, then he does not bow before the imam stands up again, then he has not caught up with the rukoo‘ of the imam, even if he caught up with the rukoo‘ of the congregation. If he did complete the takbeer when bending down, then that rukoo‘ is regarded as naafil (supererogatory) only, as noted above.
For the one who catches up with the imam when he is in the posture of bowing, his opening takbeer suffices for the takbeer of rukoo‘ only. End quote.
He also said (1/407): If the worshipper catches up with the imam when he is in the posture of bowing, then after saying the opening takbeer he is not sure whether the imam had lifted his head before he caught up with him in rukoo‘, then that rak‘ah is not to be counted, because of the possibility that the imam had stood up from bowing before he caught up with him.
As the worshipper should proceed on the basis of what is certain, then after that he should make up what is left of his prayer so that he will have done what is required of him. If he is praying behind an imam, he should do that (that is, make up what remains of his prayer) after the imam says the salaam, as in the case of one who joins the prayer late. He should not leave the imam before that, because there is no need to do so, and he should do the prostration of forgetfulness to make up for what he was uncertain about.
What appears to be the case from your question is that you did not bow in the first rak’ah, or you did bow but it was after the imam had stood up. If that is indeed the case, then you missed that rak‘ah.
We have quoted the words of al-Baahooti above, in which he said: If he says takbeer when the imam is in the posture of bowing, then he does not bow before the imam stands up again, then he has not caught up with the rukoo‘ of the imam, even if he caught up with the rukoo‘ of the congregation. End quote.
If that is indeed the case, then you should have done that rak‘ah after the imam said the salaam. Whoever did that, his prayer is valid, and whoever did not do that must repeat the prayer now.
If someone catches up with the imam when he is in the posture of bowing in the first rak‘ah, it is not permissible for him to do another rak‘ah after the imam says the salaam. If he does that, then he has added a rak‘ah, and his prayer is rendered invalid by his deliberately doing that, unless he was uncertain as to whether the imam had stood up before he bowed, in which case he should do another rak‘ah after the salaam, as noted above.
And Allah knows best.