I heard Umar bin Khattab narrate from the Prophet ﷺ in this story that he said, "Come to the aid of the distressed and guide the one who has lost his way."
حدثنا الحسن بن عيسى النيسابوري أخبرنا ابن المبارك أخبرنا جرير بن حازم عن إسحق بن سويد
سمعت عمر بن الخطاب عن النبي ﷺ في هذه القصة قال وتغيثوا الملهوف وتهدوا الضال
No references are available.
[Its chain is daif] Bazzar narrated it in Bahr Zakhkhar (1/472) from the hadith of Abdullah bin Mubarak, with the same wording. Ibn Hujayr is of unknown status (per Taqrib).