Government office prayer areas do not take the ruling of a mosque. Likewise, the women’s prayer areas in girls’ schools are not regarded as having the ruling of a mosque, because they are not mosques, either in reality or in legal ruling.
“Whoever makes a vow concerning it, or concerning prayer in a mosque other than the three—and the best of them is al-Masjid al-Haram, then the Mosque of Madinah, then al-Aqsa—is not obliged to fulfill it there.”
His statement, “Whoever makes a vow concerning it, or concerning prayer in a mosque other than the three”: “concerning it” refers back to i‘tikaf. That is, whoever vows to observe i‘tikaf, or to pray, in a mosque other than the three is not obliged to do so there. Thus, if a man vows to observe i‘tikaf in any mosque, in any land, he is not obliged to observe i‘tikaf in it, except in the three mosques. This is why the author said, “other than the three.”
What he means by the three are al-Masjid al-Haram, the Prophet’s Mosque, and al-Aqsa Mosque.
His statement, “and the best of them is al-Masjid al-Haram, then the Mosque of Madinah, then al-Aqsa,” means that the best of the three mosques is al-Masjid al-Haram, followed by the Mosque of Madinah, followed by al-Aqsa Mosque. Al-Masjid al-Haram is the mosque containing the Ka‘bah, which was the first House established for mankind. It is the noblest of houses and the most sacred of them, possessing unique distinctions not found in any other. No mosque on earth is visited as part of the pillars of Islam except al-Masjid al-Haram.
Next is the Mosque of Madinah: the Prophet’s Mosque, which the Prophet ﷺ built when he arrived in Madinah.
Then comes al-Aqsa Mosque, the mosque of most of the prophets of the Children of Israel, and it is in Palestine.