Fiqh-us-Sunnah Volume 2, Supererogatory Prayer, Fiqh 2.010C.

Section : Two rak’at before maghrib.

Al-Bukhari records, from ‘Abdullah ibn Mughaffal, that the Prophet said: “Pray before maghrib, pray before maghrib,” and after saying it a third time, he said: “For whoever wishes to do so,” not wanting the people to take it as a sunnah. Ibn Hibban records that the Prophet prayed two rak’at before maghrib prayer.

Muslim records that Ibn ‘Abbas said: “We would pray two rak’at before maghrib, and the Prophet would see us but he would not order us to do so, nor would he prohibit us.”

Ibn Hajar says in Fath al-Bari: “All of the evidence points to the fact that it is preferred to say these two rak’at quickly like the two rak’at before the salatul fajr.”