The teachers failed the students because they answered the test incorrectly.

Who is they referring to?
the students