“Answer the question” is correct without a preposition when we’re asking somebody to answer us. We typically won’t expect a correct answer; we just want a response. “Answer to the question” is used to get a more specific or correct response.
We might hear people use this when they’re trying to get an answer out of someone.