Abdullah bin Umar reported,

The Messenger of Allah ﷺ prayed two rakats at Mina, and Abu Bakr did the same after him, and Umar after Abu Bakr, and Uthman during the early part of his caliphate. Then Uthman later prayed four rakats. So Ibn Umar, whenever he prayed with the imam, would pray four, but when he prayed alone, he would pray two.

Muslim 1592

Sahih

و حدثنا أبو بكر بن أبي شيبة حدثنا أبو أسامة حدثنا عبيد الله عن نافع

عن ابن عمر قال

صلى رسول الله ﷺ بمنى ركعتين وأبو بكر بعده وعمر بعد أبي بكر وعثمان صدرا من خلافته ثم إن عثمان صلى بعد أربعا فكان ابن عمر إذا صلى مع الإمام صلى أربعا وإذا صلاها وحده صلى ركعتين

مسلم 1592صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Travelers' prayer and its shortening
Chapter
Shortening prayer at Mina
Numbering
Darussalam 1592
Muslim 1592