The part of the Hadith that discusses how and when Prophet Muhammad read loud while praying can be found in Sahih Bukhari, Book 10, Hadith 139:
Narrated Abu Huraira: Allah's Messenger (ﷺ) said, "When the Imam says, 'Sami' Allahu liman hamidah', you should say, 'Allahumma Rabbana lakal-hamd'. And if the saying of any one of you coincides with that of the angels, all his past sins will be forgiven."