The Messenger of Allah ﷺ said, "When two men conduct a sale, each of them has the option to revoke it as long as they have not parted and remain together, or until one gives the other the choice. If one gives the other the choice and they conclude the sale on that basis, the sale is binding. And if they part after concluding the sale, and neither of them has cancelled it, the sale is binding."
حدثنا محمد بن رمح المصري أنبأنا الليث بن سعد عن نافع
عن رسول الله ﷺ قال إذا تبايع الرجلان فكل واحد منهما بالخيار ما لم يفترقا وكانا جميعا أو يخير أحدهما الآخر فإن خير أحدهما الآخر فتبايعا على ذلك فقد وجب البيع وإن تفرقا بعد أن تبايعا ولم يترك واحد منهما البيع فقد وجب البيع
Bukhari narrated it in the Book of Sales, chapter "If one of the two parties gives the other the choice after the sale, the sale becomes binding," hadith no. 2112, and Muslim, Book of Sales, chapter on the validity of the option of session for the two parties to a sale, hadith no. 1531, from the hadith of Layth, with this same chain.