Sunan Ibn Majah, Book 18, Hadith 2607 (In-Book)

Sulaiman bin Hayyan said: “I heard my father narrate from Abu Hurairah that the Prophet said: 'Among those who came before you there was a man who bought some property and found therein a jar of gold. He said: “I bought land from you, but I did not buy the gold from you.” The man said: “Rather I sold you the land with whatever is in it.” They referred their case to (a third) man who said: “Do you have children?” One of them said: “I have a boy.” The other said: “I have a girl.” He said: “Marry the boy to the girl, and let them spend on themselves from it and give in charity.”

حَدَّثَنَا أَحْمَدُ بْنُ ثَابِتٍ الْجَحْدَرِيُّ، حَدَّثَنَا يَعْقُوبُ بْنُ إِسْحَاقَ الْحَضْرَمِيُّ، حَدَّثَنَا سُلَيْمَانُ بْنُ حَيَّانَ، سَمِعْتُ أَبِي يُحَدِّثُ، عَنْ أَبِي هُرَيْرَةَ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏ "‏ كَانَ فِيمَنْ كَانَ قَبْلَكُمْ رَجُلٌ اشْتَرَى عَقَارًا فَوَجَدَ فِيهَا جَرَّةً مِنْ ذَهَبٍ فَقَالَ اشْتَرَيْتُ مِنْكَ الأَرْضَ وَلَمْ أَشْتَرِ مِنْكَ الذَّهَبَ ‏.‏ فَقَالَ الرَّجُلُ إِنَّمَا بِعْتُكَ الأَرْضَ بِمَا فِيهَا ‏.‏ فَتَحَاكَمَا إِلَى رَجُلٍ فَقَالَ أَلَكُمَا وَلَدٌ فَقَالَ أَحَدُهُمَا لِي غُلاَمٌ ‏.‏ وَقَالَ الآخَرُ لِي جَارِيَةٌ ‏.‏ قَالَ فَأَنْكِحَا الْغُلاَمَ الْجَارِيَةَ وَلْيُنْفِقَا عَلَى أَنْفُسِهِمَا مِنْهُ وَلْيَتَصَدَّقَا ‏" ‏ ‏.‏

sunnah.com