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)
يُقَالُ لَهُ يَعْقُوبُ لَمْ يَكُنْ لَهُ غَيْرُهُ فَدَعَا بِهِ رَسُولُ اللهِ ﷺ فَقَالَ «مَنْ يَشْتَريهِ؟ مَنْ يَشْتَريهِ؟» فَاشْتَرَاهُ نُعَيْمُ بْنُ عَبْدِ اللهِ بِثَمَانِمِائَةِ دِرْهَمٍ فَبَعَثَهَا إِلَيْهِ وَقَالَ «إِذَا كَانَ أَحَدُكُمْ فَقِيرًا فَلْيَبْدَأْ بِنَفْسِهِ فَإِنْ كَانَ فَضْلٌ فَعَلَى عِيَالِهِ فَإِنْ كَانَ فَضْلٌ فَعَلَى قَرَابَتِهِ أَوْ عَلَى ذِي رَحِمِهِ فَإِنْ كَانَ فَضْلٌ فَهَاهُنَا وَهَاهُنَا»