A man of the Ansar called Abu Madhkur declared that his slave called Ya'qub would be free after his death, but he had no other property. So the Messenger of Allah ﷺ called him and said: Who will buy him ? Nu'aim b. 'Abd Allah b. al-Nahham bought him for eight hundred dirhams. When he handed them over to him, he (Prophet) said: If any of you is poor, he should begin from himself ; if anything is left over, give it to your family; if anything is left over, give it to your relatives ; if anything is left over (when they received something), then here and here. (Using translation from Abū Dāʾūd 3957)
عَنْ دُبُرٍ لَمْ يَكُنْ لَهُ مَالٌ غَيْرُهُ فَدَعَا بِهِ رَسُولُ اللهِ ﷺ فَقَالَ مَنْ يَشْتَرِيهِ مَنْ يَشْتَرِيهِ؟ فَاشْتَرَاهُ نُعَيْمُ بْنُ عَبْدِ اللهِ النَّحَّامُ بِثَمَانِمِائَةِ دِرْهَمٍ فَدَفَعَهَا إِلَيْهِ وَقَالَ إِذَا كَانَ أَحَدُكُمْ فَقِيرًا فَلْيَبْدَأْ بِنَفْسِهِ وَإِنْ كَانَ فَضْلٌ فَعَلَى عِيَالِهِ وَإِنْ كَانَ فَضْلٌ فَعَلَى ذِي قَرَابَتِهِ أَوْ قَالَ عَلَى ذِي رَحِمِهِ وَإِنْ كَانَ فَضْلٌ فَهَاهُنَا وَهَاهُنَا