Assalaamu alaikum. If someone prays the ‘Asr prayer at the masjid (or in an office prayer room) on his own while the main congregational prayer of ‘Asr (which is lead by the regular imam) is being held, is his prayer valid?
All perfect praise be to Allah, the Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
The congregational prayer is obligatory on men according to the preponderant view of the scholars, unless there is a valid excuse for missing it; but it is not a condition for the validity of prayer, as we have previously explained in fatwas 337036 and 92317.
So if a man is in the masjid and the Iqaamah (second call) for the prayer was announced, or if he was near the masjid such that he could hear the call to prayer and the Iqaamah, then he is obliged to join the congregation unless he has a valid excuse. If a person starts praying on his own and the congregational prayer is announced, it is recommended for him to change his intention to that of a voluntary prayer, shorten his prayer, and join the congregation.
As for a Muslim who intentionally misses the congregation and prays on his own without an excuse, his prayer is valid according to the majority of the scholars, but he bears a sin for doing that and he misses the reward of the congregational prayer, which is indeed great. The Prophet, sallallaahu ‘alayhi wa sallam, said, "The prayer in congregation is twenty-five times superior to the prayer offered individually." Another version reads, "...is twenty-seven times superior..." [Al-Bukhaari and Muslim]
Allah knows best.
You can search for fatwa through many choices