Riyad as-Saliheen 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."
[Al-Bukhari].
وعن عبد الله بن مغفل، رضي الله عنه عن النبي ﷺ قال: "صلوا قبل المغرب" قال في الثالثة: "لمن شاء" ((رواه البخاري)).
Classification
Sahih (Authentic)
References
Riyad as-Saliheen 1122
Riyad as-Saliheen Book of Virtues, Hadith 132