It is narrated from Sayyiduna Abdullah bin Amr bin al-As (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "The best companion (travel partner) in the sight of Allah Almighty is the one who is best to his companion, and the best neighbor in the sight of Allah Almighty is the one who is best to his neighbor."
Hadith Referenceسنن دارمي / من كتاب السير / 2474
Hadith Gradingتحقیق (حسین سلیم أسد الدارانی):إسناده صحيح نعم ابن لهيعة ضعيف ولكنه متابع عليه، [مكتبه الشامله نمبر: 2481]
Hadith Takhrijاس روایت کی سند میں ابن لہیعہ ضعیف ہیں لیکن دوسری سند سے یہ حدیث صحیح ہے۔ دیکھئے: [ترمذي 1944] ، [ابن حبان 518] ، [الموارد 2051]
Brief Explanation
(Commentary on Hadith 2473)
In this hadith, there is encouragement to choose good companions for travel and to behave well with one's fellow travelers.
Similarly, it teaches good conduct towards neighbors, and that neighbor is very beloved to Allah who takes care of his neighbor, does not harm him, and shares in his joys and sorrows.