When the Imam says: “Allah listens to him who praised Him,” say: “O Allah, our lord, to Thee be the praise, “ for if what anyone says synchronises with what the angels say, he will be forgiven his past sins. (Using translation from Abū Dāʾūd 848)
أَنَّ رَسُولَ اللهِ ﷺ قَالَ إِذَا قَالَ الْإِمَامُ سَمِعَ اللهُ لِمَنْ حَمِدَهُ فَقُولُوا اللهُمَّ رَبَّنَا لَكَ الْحَمْدُ فَإِنَّهُ مَنْ وَافَقَ قَوْلُهُ قَوْلَ الْمَلَائِكَةِ غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ