The following is an article written by Shaykh Badr al-Badr al-'Anazi (hafidhahullah) which analyzes the permissibility of the second congregation, based on the ahaadeeth of the Prophet (sallAllahu 'alayhi wa sallam) and explanation of our 'Ulamaa`. This article was translated by our noble brother Abu Afnaan Muhammad 'Abdullah (hafidhahullah), who has explicit written permission from the Shaykh to translate his articles click here to read.
An excerpt taken from the article ~
Al-Imaam Ibn al-Qudaamah mentioned in al-Mughnee (2/117): “It is not disliked to repeat the congregational prayer in the masjid. And this means that if the local imaam prays (with a group) and then another group comes, it is recommended for them to pray as a group and this is the position of Ibn Mas’ood, ‘Ataa, al-Hasan, an-Nakha'ee and others. However, Saalim, Maalik, Abu Haneefah, ash-Shaafi'ee and others stated that the congregational prayer is not repeated in a masjid which has an appointed imaam and is not on a passageway, etc. Thus, if he misses the congregation, he is to pray by himself.
There is no proof prohibiting the second congregation and that they are to pray by themselves and the hadeeth, “who will give charity to that one” is clear textual proof of its permissibility.