Allah has prescribed the prayer by the tongue of your Apostle (ﷺ) as two rak'ahs for the…

Sahih Muslim Book 6 Hadith 7

Sahih Muslim #687 b

The Book of Prayer - Travellers 6:7

Ibn 'Abbas reported:

Allah has prescribed the prayer by the tongue of your Apostle (ﷺ) as two rak'ahs for the traveller, four for the resident, and one in danger.

Chapter: The travelers’ prayer and shortening it

Grade: Sahih