Narrated Abu Huraira
Allah's Messenger (ﷺ) said, "When the Imam says, "Sami`a l-lahu liman hamidah," you should say, "Allahumma Rabbana laka l-hamd." And if the saying of any one of you coincides with that of the angels, all his past sins will be forgiven."