It is narrated from Hazrat Anas bin Malik (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "When the imam says «sami'a Allahu liman hamidah» (Allah hears the one who praises Him), then say «Rabbana wa laka al-hamd» (Our Lord, and to You belongs all praise)."
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 12652