The Prophet ﷺ set out from Medina when five nights remained of Dhu al-Qadah, and he arrived in Mecca after four nights of Dhu al-Hijjah had passed. The hadith continues.
انطلق النبي ﷺ من المدينة… وذلك لخمس بقين من ذي القعدة، فقدم مكة لأربع ليال خلون من ذي الحجة… الحديث.
Bukhari narrated it in the Book of Hajj (1545) from Muhammad bin Abu Bakr Muqaddami, he said, Fudayl bin Sulayman narrated to us, he said, Musa bin Uqba narrated to me, he said, Kurayb informed me, from Abdullah bin Abbas, with this wording.Note, as for the statement of Ibn Qayyim in Zad Mad (2/102) that the Prophet's ﷺ departure from Madinah six days before the end of Dhul-Qaidah refers to his departure from Madinah to Zulhulayfa, where he prayed Dhuhr and the remaining prayers, and stayed the night there, praying Fajr and Dhuhr, then departed from there five days before the end of the month, as is found in the hadith of Ayesha and Ibn Abbas .