ANSWER:

If you and the Imam were in the ruku position at the same time, this is a valid Rakah. 

while praying the namaz behind imam in masjid is it obligatory to repeat the rakah if we join in the ruku.

Prayer |