Sunan Abi Dawud, Book 15, Hadith 132 (Abu Dawud 2609)

Narrated AbuSa'id al-Khudri:

The Prophet (ﷺ) said: When three are on a journey, they should appoint one of them as their commander.