صحيح ابن خزيمه
Sahih Ibn Khuzaymah
جماع أبواب ذكر أفعال اختلف الناس فى إباحته للمحرم، نصت سنة النبى صلى الله عليه وسلم أو دلت على إباحتها
Chapters on Acts Permitted for the Pilgrim by Sunnah
(359) باب ذكر الدليل على أن النبى صلى الله عليه وسلم إنما صلى بها ركعتين؛ لأنه كان مسافرا غير مقيم،
Evidence that the Prophet prayed two units at Mina because he was a traveler, not a resident.
Hadith Number: Q2964
إذ هو صلى الله عليه وسلم كان من اهل المدينة، وإنما قدم مكة حاجا لم يقم بها إقامة يجب عليه إتمام الصلاة.
Indeed, you came to Makkah Mukarramah for Hajj and you did not stay in Makkah Mukarramah for so many days that it would have become obligatory for you to perform the full prayer. Imam Abu Bakr, may Allah have mercy on him, says in the narration of Yahya bin Abi Ishaq, in the narration of Sayyiduna Anas, may Allah be pleased with him, that the Prophet, peace and blessings be upon him, continued to perform two rak‘ahs (shortened prayer) throughout the journey of Hajj until he returned to Madinah Munawwarah.
In the hadith of Sayyiduna Ibn Abbas (may Allah be pleased with both of them), it is stated that Allah Almighty has made four rak‘ahs of prayer obligatory in residence and two rak‘ahs in travel through the tongue of your Prophet (peace be upon him). In this way, Sayyiduna Ibn Abbas (may Allah be pleased with both of them) has explicitly stated that for a person residing in Mina, four rak‘ahs of prayer are obligatory just as they are obligatory for a person residing in any other place.
تخریج الحدیث: «تقدم۔۔۔، حديث انس رضی الله عنه: تقدم برقم: 956 ـ حديث ابن عباس رضی الله عنهما، تقدم برقم: 304»