Allah prescribed the prayer through the words of your Prophet as four units for the resident, two units for the traveler, and one unit for the one in fear.
حدثنا يزيد أخبرنا أبو عوانة حدثنا بكير بن الأخنس عن مجاهد
إن الله عز وجل فرض الصلاة على لسان نبيكم على المقيم أربعا وعلى المسافر ركعتين وعلى الخائف ركعة
Its isnad is sahih. Abu Awana is Waddah bin Abdullah Yashkuri, an imam, a hafiz, and an authority. It suffices to cite what Ahmad and Yahya said, "How similar the hadith of Abu Awana is to the hadith of Thawri and Shuba." Bukhari mentioned him in Kabir.Bukayr bin Akhnas was a Kufan and trustworthy. Ibn Main, Abu Zura, Abu Hatim, and others confirmed his reliability. Bukhari mentioned him in Kabir, and in Tahdhib it is said, "He belongs to an early generation. Neither Shuba nor Thawri narrated from him, so I do not know how Abu Awana narrated from him, nor Ibn Lahia!" Neither Shuba nor Thawri narrated from him, so I do not know how Abu Awana narrated from him, nor Ibn Lahia! His son related this from him in Ilal! But this is no valid criticism, for Abu Awana saw Hasan and Ibn Sirin, and Bukayr came after both of them.Muslim narrated the hadith through the route of Abu Awana, and also narrated it through the route of Ayub bin Khalid Tai, from Bukayr bin Akhnas. Bukhari narrated part of it in Kabir, in the entry on Bukayr, through the route of Abu Awana, and Bayhaqi likewise narrated it. Abu Dawud and Nasai also narrated it, as mentioned in Muntaqa. See what has already passed. It will come again with another isnad from Bukayr. And see.