All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad is His slave and Messenger.
The one following the Imaam in the prayer should say, 'rabbana wa laka al-hamd' while coming up from bowing to an upright position. The author of Daqaa'iq Uli An-Nuha maʻa Sharh Matn Al-Muntaha (Hanbali Fiqh) said, "The place where the follower says, 'rabanna wa laka al-hamd,' is from the start of the transition until its end (i.e. from the time he starts to come up from bowing until he stands in an upright position) ... If he finished saying it in any part of this transition, then that is sufficient because he recited it in its due place in prayer."
For more benefit, please refer to fatwa 124905.
Allaah knows best.