Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
muslim:694cAbū Bakr b. Abū Shaybah > Abū Usāmah > ʿUbaydullāh > Nāfiʿ > Ibn ʿUmar

The Messenger of Allah ﷺ said two rak'ahs at Mina, and Abu Bakr after him, and 'Umar after Abu Bakr, and 'Uthman at the beginning of his caliphate; then 'Uthman observed four rak'ahs, and when Ibn 'Umar prayed with the Imam, he said four rak'ahs, but when he observed prayer alone, he said two rak'ahs.  

مسلم:٦٩٤cحَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ حَدَّثَنَا أَبُو أُسَامَةَ حَدَّثَنَا عُبَيْدُ اللَّهِ عَنْ نَافِعٍ عَنِ ابْنِ عُمَرَ قَالَ

صَلَّى رَسُولُ اللَّهِ ﷺ بِمِنًى رَكْعَتَيْنِ وَأَبُو بَكْرٍ بَعْدَهُ وَعُمَرُ بَعْدَ أَبِي بَكْرٍ وَعُثْمَانُ صَدْرًا مِنْ خِلاَفَتِهِ ثُمَّ إِنَّ عُثْمَانَ صَلَّى بَعْدُ أَرْبَعًا فَكَانَ ابْنُ عُمَرَ إِذَا صَلَّى مَعَ الإِمَامِ صَلَّى أَرْبَعًا وَإِذَا صَلاَّهَا وَحْدَهُ صَلَّى رَكْعَتَيْنِ  


See similar narrations below:

Collected by Ibn Ḥibbān

ذِكْرُ وَصْفِ صَلَاةِ الْحَاجِّ بِمِنًى أَيَّامَ مَقَامِهِ بِهَا

ibnhibban:3893al-Ḥasan b. Sufyān > Muḥammad b. ʿAbdullāh b. Numayr > ʿUqbah b. Khālid > ʿUbaydullāh b. ʿUmar > Nāfiʿ > Ibn ʿUmar

[Machine] "The Prophet ﷺ used to pray two rak'ahs in Mina, and Abu Bakr, Umar, and Uthman used to do the same. Then Uthman used to pray another four rak'ahs after that. Ibn Umar used to pray with the Imam in his prayers, but when he prayed alone, he would pray four rak'ahs."  

ابن حبّان:٣٨٩٣أَخْبَرَنَا الْحَسَنُ بْنُ سُفْيَانَ قَالَ حَدَّثَنَا مُحَمَّدُ بْنُ عَبْدِ اللَّهِ بْنِ نُمَيْرٍ قَالَ حَدَّثَنَا عُقْبَةُ بْنُ خَالِدٍ عَنْ عُبَيْدِ اللَّهِ بْنِ عُمَرَ عَنْ نَافِعٍ عَنِ ابْنِ عُمَرَ قَالَ

«كَانَ النَّبِيُّ ﷺ يُصَلِّي بِمِنًى رَكْعَتَيْنِ وَأَبُو بَكْرٍ وَعُمَرُ وَعُثْمَانُ ثُمَّ صَلَّى عُثْمَانُ بَعْدَ أَرْبَعًا وَكَانَ ابْنُ عُمَرَ يُصَلِّي مَعَ الْإِمَامِ بِصَلَاتِهِ فَإِذَا صَلَّى وَحْدَهُ صَلَّى أَرْبَعًا»