This isn't really a literal translation. The Irish sentence is in present tense, but the English translation is in the future tense. I tried to translate it as "Are you answering the teacher?", and it wouldn't accept it.
So, it's because of chun. Verbal nouns can be changed a lot with different prepositions. I suggest looking here
I thought the genitive was required after chun or chun an? An bhfuil tú chun an mhúinteora a fhreagairt? http://www.nualeargais.ie/gnag/gram.htm?chuig.htm