We are interested in the left-end area under the standard normal curve that has the area 0.025.
But the problem seems to be simpler than that:
If n = number of students in the class, and we know that 2.5% of these students failed the course, and that 5 failed, then we can surmise that
0.025n = 5. Solving for n by multiplying both sides by 40, we get n = 200.
There were 200 students in the class.
It is perfectly fair for a teacher to put more info into a problem statement than you really need to solve the problem. That seems to be what happened here.