Please contribute generously in order to ensure the continuity of our website InshaAllah.
Praise be to Allah.
Muslim (710) narrated from Abu Hurayrah that the Prophet |(blessings and peace of Allah be upon him) said: “When the iqaamah for prayer is given, there is no prayer except the prescribed prayer.” This applies to the one to whom the command to pray in congregation is addressed or to the one who is present in the mosque when the iqaamah for prayer has been given. With regard to the woman who is in her house or a man who is excused for not attending prayers in congregation, they are not addressed in this hadeeth, so they may offer the naafil prayer even when they can hear the iqaamah from the mosques.
The same applies to a man if he wants to pray in a mosque other than the one in which the iqaamah has been given; he may offer the naafil prayer in his house.
It says in Kashshaaf al-Qinaa‘ (1/460): If the iqaamah has been given, i.e., the muezzin has started to give the iqaamah for the prayer the he wants to offer behind the imam (then he should not do any naafil prayer), otherwise he may do so, such as if the iqaamah is given in a mosque in which he does not intend to pray. This was stated in al-Furoo‘. To sum up, there should be no prayer except the prescribed prayer (after the iqaamah has been given), so he should not start any naafil prayer or any regular Sunnah prayer, before Fajr or otherwise, in the mosque or elsewhere, or even in his house, because the Prophet (blessings and peace of Allah be upon him) said: “When the iqaamah for prayer is given, there is no prayer except the prescribed prayer.” End quote.
For more information see the answer to question no. 33582
And Allah knows best.