I prayed the two rakahs before Maghrib during the time of the Messenger of Allah ﷺ.I said to Anas, "Did the Messenger of Allah ﷺ see you doing this?"He replied, "Yes, he saw us, but he neither commanded us nor forbade us."
حدثنا محمد بن عبد الرحيم البزاز أخبرنا سعيد بن سليمان حدثنا منصور بن أبي الأسود عن المختار بن فلفل
صليت الركعتين قبل المغرب على عهد رسول الله ﷺ قال قلت لأنس أرآكم رسول الله ﷺ قال نعم رآنا فلم يأمرنا ولم ينهنا
Reported by Muslim in the Book of the Traveler's Prayer, chapter on the desirability of praying two rakahs before the Maghrib prayer, hadith no. 836, from the hadith of Mukhtar bin Fulful, through this same chain.