The Messenger of Allah ﷺ said, "Adam and Musa argued with one another.Musa said to him, 'Are you Adam, whose sin caused you to be expelled from Paradise?'Adam replied to him, 'Are you Musa, whom Allah chose with His message and His direct speech, and yet you blame me for a matter that was decreed for me before I was even created?'"The Messenger of Allah ﷺ then said, "So Adam prevailed over Musa in the argument," repeating it twice.
قال رسول الله ﷺ: احتج آدم وموسى. فقال له موسى: أنت آدم الذي أخرجتك خطيئتك من الجنة؟ فقال له فقال له آدم: أنت موسى الذي اصطفاك الله برسالته وبكلامه، ثم تلومني على أمر قدر علي قبل أن أخلق؟ فقال رسول الله ﷺ: فحج آدم موسى مرتين.
Bukhari narrated it in the Chapters on the Prophets (3409), and Muslim in the Chapter on Divine Decree (2652:15), both from the hadith of Ibrahim bin Saad, from Ibn Shihab, from Humayd bin Abdul-Rahman, from Abu Hurairah, who mentioned it.