Praise be to Allah.
If the imam does the prostration of recitation and the person praying behind him thinks that he has bowed so he bows based on the assumption that the imam has bowed, then we have one of two scenarios.
1 – He realizes that the imam is prostrating when he is bowing; in this case he has to prostrate, following the imam.
2 – He does not realize that the imam was prostrating until after he gets up from prostration. In that case we say to the person who bowed: stand up now and follow the imam, and bow with your imam and carry on, and the prostration of recitation is waived in your case, because the prostration of recitation is not a pillar or essential part of the prayer such that you need to do it after your imam, rather you are obliged to follow your imam. You missed out on following, and it is a Sunnah that was missed at the proper time, so you should carry on with your prayer. End quote.