It is narrated with this chain: The Messenger of Allah (ﷺ) said: "A man from the Children of Israel bought land from another man, and he found in it a pot of gold which was sealed. So he said to the seller of the land: Take your pot, for I bought the land, I did not buy the gold. The other man said: Do you want to return to me the wealth which Allah has taken from me? So they both brought the case before a judge. The judge said: Do either of you have children? They said: Yes. One said: I have a son, and the other said: I have a daughter. He said: Then marry one to the other, and give this wealth to both of them, so they may spend it on themselves and also give charity from it."
Hadith Referenceمسند اسحاق بن راهويه / كتاب الاقضية / 896
Hadith Takhrij«مسلم كتاب الاقضية ، باب استحباب اصلاح الحاكم ، رقم : 1721 . مسند احمد : 316/2 .»