Language:
كتاب التوحيد
97  
Oneness, Uniqueness of Allah (Tawheed)
(45)
Chapter: ‘If I have been given what this man has been given, I would do the same as he is doing.’
(45)
باب قَوْلِ النَّبِيِّ صلى الله عليه وسلم ‏{‏رَجُلٌ آتَاهُ اللَّهُ الْقُرْآنَ فَهْوَ يَقُومُ بِهِ آنَاءَ اللَّيْلِ وَالنَّهَارِ، وَرَجُلٌ يَقُولُ لَوْ أُوتِيتُ مِثْلَ مَا أُوتِيَ هَذَا فَعَلْتُ كَمَا يَفْعَلُ»
Sahih al-Bukhari 7528

Narrated Abu Huraira:

Allah's Messenger (ﷺ) said, "Not to wish to be the like of except the like of two men: a man whom Allah has given the Qur'an and he recites it during the hours of the night and the hours of the day, in which case one may say, "If I were given the same as this man has been given, I would do the same as he is doing.' The other is a man whom Allah has given wealth and he spends it in the right way, in which case one may say, 'If I were given the same as he has been given, I would do the same as he is doing."

حَدَّثَنَا قُتَيْبَةُ، حَدَّثَنَا جَرِيرٌ، عَنِ الأَعْمَشِ، عَنْ أَبِي صَالِحٍ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ لاَ تَحَاسُدَ إِلاَّ فِي اثْنَتَيْنِ رَجُلٌ آتَاهُ اللَّهُ الْقُرْآنَ فَهْوَ يَتْلُوهُ آنَاءَ اللَّيْلِ وَآنَاءَ النَّهَارِ، فَهْوَ يَقُولُ لَوْ أُوتِيتُ مِثْلَ مَا أُوتِيَ هَذَا، لَفَعَلْتُ كَمَا يَفْعَلُ‏.‏ وَرَجُلٌ آتَاهُ اللَّهُ مَالاً فَهْوَ يُنْفِقُهُ فِي حَقِّهِ فَيَقُولُ لَوْ أُوتِيتُ مِثْلَ مَا أُوتِيَ عَمِلْتُ فِيهِ مِثْلَ مَا يَعْمَلُ ‏"‏‏.‏
Reference : Sahih al-Bukhari 7528
In-book reference : Book 97, Hadith 153
USC-MSA web (English) reference : Vol. 9, Book 93, Hadith 619
  (deprecated numbering scheme)