It is obligatory for these people to pray in the masjid, rather it is obligatory for every person close to a masjid to pray in it. And it is not permissible for anyone or a group of people to pray at home while there is a masjid near them. As for when the masjid is far, then there is no harm in praying in congregation at home. What is correct is that it is necessary to have a congregation in the masjid due to the saying of the Prophet (sallallaahualaihi wasallam), “I had considered ordering for the prayer to be established, then I would order every man to pray and set loose men who have with them logs of wood upon a people who did not come to the prayer and I would burn their houses with the fire.” So he (sallallaahualaihi wasallam) said, ‘upon a people’ despite the fact that these people could have prayed in their homes, in congregation. So it is obligatory for these people to pray in congregation except if they are far (from the masjid) and it is difficult for them (to travel to the masjid).
As for the question, does (prayer in) a masjid in Makkah have the same reward as (prayer in) Masjid al-Haraam; A masjid in Makkah does not have the same reward as Masjid al-Haraam, rather the multiple reward is only for Masjid al-Haraam, due to the saying of the Prophet (sallallaahualaihi wasallam), “Prayer in my masjid is thousand times better than in any other masjid except Masjid al-Haraam.” So just as the virtue is specific for the masjid of the Messenger (sallallaahualaihi wasallam), it is also the same for Masjid al-Haraam. And in Saheeh Muslim from Maymunah (radiallaahu anhaa) who said that, “I heard the Prophet (sallallaahualaihi wasallam) say, “Prayer in it is better than a thousand prayers in any other masjid except the Masjid al-Ka’bah.” And this is further proved by his saying, “Do not undertake a journey except to three masaajid: Masjid al-Haraam, this masjid of mine and Masjid al-Aqsaa.” And the wording of Muslim, “Verily a journey is taken to only three masaajid, Masjid al-Ka’bah, my masjid and Masjid al-Aqsaa.”
And what is well known is that if we set out on a journey to a masjid from the masaajid of Makkah other than Masjid al-Haraam, then this would not be legislated, rather it would be prohibited. So that which a journey is undertaken to is one which has multiple reward.
Yes, prayer in the masaajid present in the Haram is better than prayer in the Hal (outside the Haram). And the proof for this is that when the Prophet (sallallaahualaihi wasallam) was staying in Hudaybiyyah and a part of it was in the Hal and the other part was in the Haram, he (sallallaahualaihi wasallam) would pray (in the part which was) in the Haram, even though he was staying in the Hal. So this proves that prayer in the Haram is better, but it does not reach the multiple rewards which are equal to a hundred thousand prayers.