References:
Tahiyaat-ul-Masjid: 2 Nafls to pray when entering the mosque.
Hadrat Abu Qatâdah (Allâh be pleased with him) relates that the Prophet (SAWW) said, “When one of you enters the masjid, he should not sit until he has prayed two rak’ât.” [RS-1144, agreed upon]
Sahih Bukhari:
Volume 1, Book 8, Number 435:
Narrated Abu Qatada Al-Aslami:
Allah's Apostle said, "If anyone of you enters a mosque, he should pray two Rakat before sitting."
Volume 2, Book 21, Number 264:
Narrated Abu Qatada bin Rabi Al-Ansari;
The Prophet said, "If anyone of you enters a Mosque, he should not sit until he has offered a two-Rakat prayer."
2 Rakaat before Maghrib:
Volume 9, Book 92, Number 465:
Narrated 'Abdullah Al Muzam:
The Prophet said, "Perform (an optional) prayer before Maghrib prayer." (He repeated it thrice) and the third time he said, "Whoever wants to offer it can do so," lest the people should take it as a Sunna (tradition). (See Hadith No. 277, Vol. 2)
And it is said that you can pray as many nafl after maghrib as you want, 2 being the most common. I'd like to know the reason why you believe in offering 2 nafl rakaat and not before, i'm kind of confused.
Was'Salaam.