If you are in your second rak’ah and you believe that you can rush it so that you say the first takbeer with the Imam, you should continue it.
But if you are in the 1st rak’ah and by the time you finish, the Imam would have started his prayer and way into the fatiha, you should cut your prayer and join the Imam.