Explanation:
come on, you should really be able to answer these things yourself now !
in such cases the total is not the whole class, but the sum of all students that satisfy a certain basic criteria. in this case it is "did not complete the homework".
now, from all the students that did not complete the homework (3+5 = 8), how many have still passed the test ?
3.
so the probability to still pass the test although the homework was not completed is
3/8