"Mahalo i kēia hui ʻana" is grammatically correct, and is an accepted answer. It often happens that common phrases lose words (sometimes they get swallowed in speech) that you might expect if you are approaching the language from a more formal grammar perspective. "Mahalo ke Akua" is one of these cases. As someone who has learned the language in a classroom, I would expect the article of address, "e", to come before "ke Akua", but it is not usually heard that way.
Just wondering, why are there so many "Iesu pū" and "Ke Akua pū" in this lesson but no "You are welcome" and the likes? Coming from a region in Germany where "Grüß' Gott!" is used interchangeable with "Hello" or "Good day" I can see where it's coming from but I wouldn't expect "Grüß' Gott" to be taught in a German course. Is "Ke Akua pū" used as a common phrase to wish somebody well?