One of the companions of the Prophet ﷺ reported that the Prophet ﷺ said, "If two people invite you at the same time, accept the invitation of the one whose door is nearer, for the one whose door is nearer is the closer neighbor. But if one of them came first, accept the invitation of the one who came first."
من أصحاب النبي ﷺ أن النبي ﷺ قال: إذا اجتمع الداعيان فأجب أقربهما بابا، فإن أقربهما بابا أقربهما جوارا، وإن سبق أحدهما فأجب الذي سبق.
Abu Dawud (3756) and Ahmad (23466) both narrated it from the hadith of Abdul-Salam bin Harb, from Abu Khalid Dalani, from Abu Ala Awdi, from Humayd bin Abdul-Rahman Himyari, from a man among the companions of the Prophet ﷺ, and he mentioned it.Its isnad is hasan on account of Abu Khalid Yazid bin Abdul-Rahman Dalani, for there is disagreement concerning him, though his hadith is hasan unless the contrary becomes clear.