@SMickey,
A is a better choice, IMHO. Perhaps you should ask your teacher/prof why B is wrong.
This is not one of the test choices but ..the way it is most likely to be spoken is the following:
"The last person leaving the classroom should turn off the light."
I disagree that B is a wrong choice; however, I'm not grading your test.