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, sallallaahu 'alyhi wa sallam, is His slave and Messenger.
The scholars differed in opinion about whether or not it is permissible to pray behind someone who is already preceded in prayer. Some of them did not allow this and some others allowed it; Shaykh Al-Islam Ibn Taymiyyah was one such scholar who considers that the preponderant opinion is that it is permissible.
In our view, it is not permissible to take someone as an Imaam whilst being led in prayer as it is not possible for a person who is being led in prayer to be leading the prayer at the same time. Al-Haythami said that there is a consensus of the scholars about the impermissibility of this. Nonetheless, if a person is preceded in prayer and stands up to complete his prayer, then it is permissible for other people to pray behind him and consider him as an Imaam according to a group of scholars as he is no longer considered as being led in prayer. However, other scholars do not permit this as such a person has already been led in prayer.
This is in the case where he joined one Rak’ah (unit) or more in prayer with the Imaam, but if he did not catch even one Rak’ah with the Imaam, then it is permissible for him to be taken as an Imaam without any difference of opinion that we know of.
Moreover, it is permissible for a person being led in prayer to be leading the same prayer if there is a sound valid religious reason for the Imaam not to continue his prayer [in case his ablution is invalidated for instance], and it is alright for him to be pulled forward by the Imaam to lead the prayer even though he had been led in the same prayer.
Allaah Knows best.