She wasn't able to answer the question.

Literal

She [topic-は] question [to-に] answer [nominalizer-こと] [subject-が] could-not-do.

質問に答える (to answer a question) uses に to mark what is being answered. ことができなかった is the past negative potential — she was unable to answer. The formality of ことができる versus plain 答えられなかった makes this feel slightly textbook-like, though both are grammatically correct.