Answered by Shaykh Amjad Rasheed
If a man enters the masjid and finds that the first jam`ah has already finished and then he sees two other groups praying by mistakes at the same time, because the masjid is so big, should he wait until one of them ends and then join the other? Or should he choose to pray with the group that has the biggest number or according the fiqh of the imam?
The deciding factor in our school is this: If the masjid is a much-frequented one, i.e. people are constantly entering the masjid to pray, then it is not makruh to have to groups praying in it at the same time. So let him choose join the bigger groupthis is recommended, because it has more people. Another recommended consideration is choosing the congregation whose imam is more learned.
On the contrary, if the masjid is not a much-frequented one, it is makruh for two groups to pray in it at the same time, though not haram. In that case, it is not obligatory to wait for one of them to finish, but it’s better if he waits for one to finish and them follow the other that is still going on, or he may wait until they both finish, then he can start praying in a new group from the beginning. And Allah knows what is correct.
– Amjad Rasheed
(Translated by Shazia Ahmad)