She asked Ayesha, "How many rakahs did the Messenger of Allah ﷺ pray for the Duha prayer?"Ayesha replied, "Four rakahs, and he would add as many more as he wished."
أنها سألت عائشة: كم كان رسول الله ﷺ يصلي صلاة الضحى؟ قالت: أربع ركعات ويزيد ما شاء.
Muslim narrated it in "the prayer of travelers" (719), from Shayban bin Farroukh, who said, Abdul-Warith told us, Yazid (meaning al-Rishk) told us, Muazah told me, and she related the hadith.Her statement will come later, "I never saw the Messenger of Allah ﷺ pray Duha at all." Just as it will also come that he used to pray Duha when he returned from being away. So the negation should be understood as referring to his not doing it regularly, while the affirmation should be understood as referring to his coming back from travel. This is because all these hadiths are sahih.