The Messenger of Allah ﷺ said, "A man bought a piece of property from another man, and the buyer found in it a jar filled with gold.The one who had bought the property said, 'Take your gold from me. I bought only the land from you, I did not buy the gold.'But the one who had sold the land said, 'I sold you the land and whatever is in it.'So they took their dispute to another man, and the one they brought it to asked, 'Do you have children?'One of them said, 'I have a son.'The other said, 'I have a daughter.'He said, 'Marry the boy to the girl, spend on the two of them from this gold, and give the rest in charity.'"
وقال رسول الله ﷺ اشترى رجل من رجل عقارا له فوجد الرجل الذي اشترى العقار في عقاره جرة فيها ذهب فقال الذي اشترى العقار خذ ذهبك مني إنما اشتريت منك الأرض ولم أبتع منك الذهب وقال الذي باع الأرض إنما بعتك الأرض وما فيها قال فتحاكما إلى رجل فقال الذي تحاكما إليه ألكما ولد قال أحدهما لي غلام وقال الآخر لي جارية قال أنكح الغلام الجارية وأنفقوا على أنفسهما منه وتصدقا
This is also a sahih hadith, and it appears in the individual Sahifah under number 78. Bukhari related it [4:174-175 print / 6:375-376 Fath] through the route of the Sahifah, and Muslim also related it through that route [5:133 print / 2:42-43 Bulaq]. The wording of the hadith here matches Bukhari's wording except in two words.In its statement, "and the one who sold the land said," while Bukhari's wording is, "and the one to whom the land belonged said." The Hafiz noted in the Fath that this is the wording of the Musnad's version. As for Muslim's version, it has, "so the one who sold the land said," which matches the wording of the individual Sahifah. Shara here means sold.And in its statement, "the boy married the girl," while Bukhari's wording is, "they married," in the plural form, and likewise is Muslim's wording. What appears here matches what is in the individual Sahifah. And in Muslim and the individual Sahifah, "and spend on yourselves from it," while what appears here matches Bukhari's version, which is the better wording, though there is some awkwardness in it.