كتاب الأيمان
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 1651 f

Tamim b. Tarafa reported:

I heard 'Adi b. Hatim say that a person asked that and then narrated (the hadith) like one (mentioned above), but he made this addition:" Here are four hundred (dirhams) for you out of my gift."
حَدَّثَنِي مُحَمَّدُ بْنُ حَاتِمٍ، حَدَّثَنَا بَهْزٌ، حَدَّثَنَا شُعْبَةُ، حَدَّثَنَا سِمَاكُ بْنُ حَرْبٍ، قَالَ سَمِعْتُ تَمِيمَ بْنَ طَرَفَةَ، قَالَ سَمِعْتُ عَدِيَّ بْنَ حَاتِمٍ، أَنَّ رَجُلاً، سَأَلَهُ فَذَكَرَ مِثْلَهُ وَزَادَ وَلَكَ أَرْبَعُمِائَةٍ فِي عَطَائِي ‏.‏
Reference : Sahih Muslim 1651f
In-book reference : Book 27, Hadith 27
USC-MSA web (English) reference : Book 15, Hadith 4061
  (deprecated numbering scheme)