Answered by Shaykh Faraz Rabbani
Question: Should the Imam who is leading the prayer say “Rabbana lakal hamd” himself after saying “Sami’Allahu liman hamidah”?
Answer: In the Name of Allah, Most Gracious, Most Merciful
According to Imam Abu Hanifa (Allah have mercy on him), he should not say “Rabbana Lakal Hamd.” According to his Companions (Abu Yusuf and Muhammad ibn al-Hasan), he should.
The scholars differed on which position is sounder. The primary texts (mutun) of the school support Abu Hanifa’s position, though some of the later scholars preferred that position of his Companions.
Ibn Abidin seems to incline towards Abu Hanifa’s position, and the default in the school is that his position is preferred unless there is clear reason to prefer the position of this Companions.
As an aside, the most optimal is to say, “Allahumma Rabbana wa Lakal Hamd.” Then, without the “wa.” Then, without the “Allahumma” only. Then, without both the “wa” and the “Allahumma.” They all fulfill the sunna for the one praying alone or as a follower.
And Allah knows best.