Prayer was first prescribed as two units. The traveler's prayer was left as it was, while the resident's prayer was made complete.Zuhri said, I asked Urwa, "Why does Ayesha pray the full prayer when traveling?"He replied, "She interpreted it the same way Uthman did."
الصلاة أول ما فرضت ركعتين فأقرد صلاة السفر وأتمت صلاة الحضر. قال الزهري فقلت لعروة: ما بال عائشة تتم؟ قال: تأولت ما تأول عثمان.
Bukhari related it in the chapter on shortening the prayer (1090), and Muslim in the prayer of travelers (685:3), both from the hadith of Sufyan, from Zuhri, from Urwa, from Ayesha, as I have mentioned. The meaning of their interpretation, as the majority of scholars have said, is that they considered shortening the prayer permissible, not obligatory, though other views have also been given. See Khulasa Nawawi (2/725).As for what has been narrated from Uthman as a raised hadith, "Whoever settles in a town should pray the prayer of a resident," this is a daif hadith. See its sourcing in the book of prayer, in the collected chapters on the traveler's prayer.I will add here what Hafiz said in Fath al-Bari (2/570), "This hadith is not sound because it is disconnected (munqati), and among its narrators are those who cannot be relied upon. It is also contradicted by Urwa's statement that Ayesha interpreted the matter just as Uthman had interpreted it, yet it is not conceivable that Ayesha would have settled anywhere at all, which shows the weakness of the report."He also said, "Then it became clear to me that Urwa's statement, 'just as Uthman interpreted it,' could mean a resemblance to Uthman in completing the prayer through some interpretation, not that their interpretations were identical. This is supported by the fact that the reasons given for Uthman's interpretation varied and multiplied, unlike the interpretation attributed to Ayesha."It has also been said that Uthman completed the prayer because he intended to stay after Hajj, though this report is mursal. Abdul-Razzaq related it from Zuhri, that Uthman did so, as mentioned.It has also been said that Uthman bin Affan completed the prayer at Mina because of the bedouins, since they had become numerous that year, so he led the people in a prayer of four units to teach them that the prayer is four units. Abu Dawud related it (1964) from Musa bin Ismail, who said, Hammad narrated to us, from Ayub, from Zuhri, that Uthman bin Affan did so, as mentioned. This too is mursal.However, it is strengthened by what Bayhaqi related (3/144) through the route of Abdul-Rahman bin Humayd bin Abdul-Rahman bin Awf, from his father, from Uthman, that he completed the prayer at Mina and then gave a sermon, saying, "Shortening the prayer is the sunnah of the Messenger of Allah ﷺ and his two companions, but common rabble have appeared, so I feared they would take this as a settled practice."And from Ibn Jurayj, that a bedouin called out to him at Mina, "O Commander of the Faithful, I have not stopped praying it as two units since I saw you do so the first year." Ibn Hajar said, "These are various routes that reinforce one another."Bayhaqi said, following the hadith of Abdul-Rahman bin Humayd, "Other explanations besides this have also been given, but the most likely view is that Uthman regarded it as a matter of permission, considering completing the prayer to be allowed, just as Ayesha did. This has also been related from more than one of the companions, even though they themselves preferred to shorten the prayer."