Hadithcore
Riyad as-Salihin, 1122

'Abdullah bin Mughaffal (May Allah be pleased with him) reported:

The Prophet (ﷺ) said, "Perform two Rak'ah before Maghrib prayer." He (ﷺ) repeated it twice; when repeating it for the third time he added: "He who may so wish." <b>[Al- Bukhari]</b>.

وعن عبد الله بن مغفل، رضي الله عنه عن النبي صلى الله عليه وسلم قال‏:‏ ‏"‏صلوا قبل المغرب‏"‏ قال في الثالثة‏:‏ ‏"‏لمن شاء‏"‏ ‏(‏‏(‏رواه البخاري‏)‏‏)‏‏.‏

References1 variant
In-Book Reference
Book 8, Hadith 132
Sharh · explanationclick to expand
<b>Guidance from the Hadiths:</b><br> 1) The Companions (may Allah be pleased with them) were keen to perform the supererogatory Rak‘ahs associated with the Maghrib prayer.<br> 2) The supererogatory Rak‘ahs before the Maghrib are Sunnah, but they are not confirmed like the Sunnah after Maghrib.