كتاب الأيمان
27  
The Book of Oaths
(3)
Chapter: It is recommended for the one who swears an oath then sees that something else is better than it; To do that which is better and offer expiation for his oath
(3)
باب نَدْبِ مَنْ حَلَفَ يَمِينًا فَرَأَى غَيْرَهَا خَيْرًا مِنْهَا أَنْ يَأْتِيَ الَّذِي هُوَ خَيْرٌ وَيُكَفِّرَ عَنْ يَمِينِهِ
Sahih Muslim 1649 h

Abu Musa reported:

We walked on foot and came to Allah's Apostle (may peace he upon him) asking him to provide us with mounts. The rest of the hadith is the same.
حَدَّثَنَا مُحَمَّدُ بْنُ عَبْدِ الأَعْلَى التَّيْمِيُّ، حَدَّثَنَا الْمُعْتَمِرُ، عَنْ أَبِيهِ، حَدَّثَنَا أَبُو السَّلِيلِ، عَنْ زَهْدَمٍ، يُحَدِّثُهُ عَنْ أَبِي مُوسَى، قَالَ كُنَّا مُشَاةً فَأَتَيْنَا نَبِيَّ اللَّهِ صلى الله عليه وسلم نَسْتَحْمِلُهُ ‏.‏ بِنَحْوِ حَدِيثِ جَرِيرٍ ‏.‏
Reference : Sahih Muslim 1649h
In-book reference : Book 27, Hadith 17
USC-MSA web (English) reference : Book 15, Hadith 4051
  (deprecated numbering scheme)