A man bought a piece of property, which was land, from another man. After the sale, the buyer found a jar of gold in the land he had bought.
He went to the seller and said, in the meaning of the hadith: take your gold from me, for I only bought the land from you and I did not buy the gold.
The seller answered that he had sold him the land and everything in it. So each man was trying to hand the gold to the other, and neither wanted to take what he felt was not his.
They took the matter to a third man to judge between them. He asked whether they had children. One said that he had a boy, and the other said that he had a girl. The third man advised them to marry the boy to the girl, to spend on them from the gold, and to give charity.
There is a small difference in wording between the two books. Sahih al-Bukhari has the advice to spend on the two young people from it, and Sahih Muslim has the advice to spend on yourselves from it. In both, the advice also includes giving charity.