I saw the Messenger of Allah ﷺ praying while riding a donkey, facing toward Khaybar.
رأيت رسول الله ﷺ يصلي وهو على حمار، وهو متوجه إلى خيبر.
Malik narrated it in "Shortening the Prayer" (25), from Amr bin Yahya Mazini, from Abu Hubab Saeed bin Yasar, from Abdullah bin Umar, and he related it. Muslim narrated it in "The Prayer of Travelers" (700/35), from Yahya bin Yahya Nisaburi, who said, "I read it to Malik," with the same wording.This hadith is among those mentioned by Daraqutni in Tatabbu (p. 390), and after mentioning Muslim's hadith by way of Amr bin Yahya Mazini, he said, "Abu Bakr bin Umar contradicted him, narrating from Abu Hubab and saying, 'on the camel,' and Jabir and others likewise said this from the Prophet ﷺ. He (Muslim) included both narrations, but Bukhari did not include the hadith of Amr bin Yahya, and included only the other one. Whoever narrated that the Prophet ﷺ prayed on a donkey has erred, and the correct account is that this was the practice of Anas." End of quote.Nasai and others likewise said that Amr bin Yahya Mazini erred in mentioning the donkey in this hadith, because the journey to Khaybar was long, and it is inconceivable that such distances would be covered on a donkey.Another scholar said, "Amr bin Yahya Mazini is trustworthy. Abu Hatim and Nasai both affirmed his trustworthiness. Ibn Adi said, 'Amr bin Yahya Mazini was narrated from by the leading scholars, namely Ayub, Ubaydullah, Thawri, Shuba, Malik, Ibn Uyayna, and others, and there is no harm in him given that these leading scholars narrated from him.'"This hadith is among those that Malik narrated from him, and Muslim's inclusion of it in his Sahih is evidence that he did not err in it. Riding the donkey occurred during the Prophet's ﷺ journey to Khaybar, while riding the mount mentioned in the hadith of Abu Bakr bin Umar occurred during his journey to Makkah. So there is no contradiction between the two accounts.