The Prophet ﷺ offered four rakʿat in Medina and then two rakʿat at Dhul Hulaifa and then passed the night at Dhul-Hulaifa till it was morning and when he mounted his Mount and it stood up, he started to recite Talbiya.
صَلَّى النَّبِيُّ ﷺ بِالْمَدِينَةِ أَرْبَعًا وَبِذِي الْحُلَيْفَةِ رَكْعَتَيْنِ ثُمَّ بَاتَ حَتَّى أَصْبَحَ بِذِي الْحُلَيْفَةِ فَلَمَّا رَكِبَ رَاحِلَتَهُ وَاسْتَوَتْ بِهِ أَهَلَّ