Hadrat Rifa’ah ibn Rafi’ az-Zuraqi Radiallahu Anhu narrates, “We were offering Salaah behind Rasulullah Salallahu Alaihi Wasallam. When he raised his head from the Ruku’, he said:
سَمِعَ اللهُ لِمَنْ حَمِدَهْ
“Allah Ta’ala has heard the one who praised Him”
A person behind him said:
رَبنَا وَلَك الْحَمد حمداً كثيرا طيبا مُبَارَكًا فِيهِ
“O our Sustainer! For You is abundant praise. Praise that is pure and in which there is blessing.”
When Rasulullah Salallahu Alaihi Wasallam completed the Salaah, he asked, “Who was the person who spoke?” The person said, “It was I.” Rasulullah Salallahu Alaihi Wasallam said, “I saw over 30 angels racing towards the words that you uttered, to see which of them would record it.” [Sahih Bukhari]
Hadrat Abu Hurairah Radiallahu Anhu narrates that Rasulullah Salallahu Alaihi Wasallam said, “When the Imaam says,
سَمِعَ اللهُ لِمَنْ حَمِدَهْ
“Allah Ta’ala has heard the one who praised Him”
You must say,
رَبنَا َلَك الْحَمد
“O Allah, our Sustainer. For You is all Praise”
“Surely he whose statement coincides with that of the angels, all his past sins are forgiven.”
Another narration states: “You must say, ‘O our Sustainer! And for You is all Praise.” [Sahih Bukhari]