They both traced it back to the Prophet ﷺ, who said, "It is not lawful for a man to give a gift and then take it back, except for a father with what he gives his child. The one who gives a gift and then takes it back is like a dog that eats until it is full, then vomits, and then goes back to its vomit."
قال حدثنا محمد بن جعفر حدثنا حسين المعلم عن عمرو بن شعيب عن طاوس عن ابن عمر وابن عباس عن النبي ﷺ أنه قال فذكر مثله