You were right with your answer, the teacher is probably just wanting you to tip on the subtotal (before tax) instead of the total total. Instead of doing total+tax+tip, we're going to figure out the tax and tip separately and then add it all together.
<u>Tipping on the subtotal (what your teacher wanted)</u>