The Prophet ﷺ said, "When two invitations come to you at the same time, accept 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 one who came first."
حدثنا هناد بن السري عن عبد السلام بن حرب عن أبي خالد الدالاني عن أبي العلاء الأودي عن حميد بن عبد الرحمن الحميري
أن النبي ﷺ قال إذا اجتمع الداعيان فأجب أقربهما بابا فإن أقربهما بابا أقربهما جوارا وإن سبق أحدهما فأجب الذي سبق
Sourcing, [its chain is daif]. Ahmad narrated it (5/408) from Abdul-Salam bin Harb with this wording, and Hafiz declared it daif in Talkhis Habir (3/196). Abu Khalid Dalani transmitted it using the ambiguous word "an," and he was known to obscure breaks in his chains of transmission.