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 chapter on Hajj (1545), from Muhammad bin Abu Bakr Muqaddami, who said, Fudayl bin Sulayman narrated to us, who said, Musa bin Uqba narrated to me, who said, Kurayb informed me, from Ibn Abbas, and he mentioned it.