Sunan Abi Dawud, Book 28, Hadith 21 (Abu Dawud 3757)

Narrated AbdurRahman al-Himyari:

A companion of the Prophet (ﷺ) reported him as saying: When two people come together to issue an invitation, accept that of the one whose door is nearer in neighbourhood, but if one of them comes before the other accept the invitation of the one who comes first.