Answer:
$30.72
Explanation:
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.
Tipping on the subtotal (what your teacher wanted)
20% of $24 = $4.80
8% of $24 = $1.92
$24+$4.80+$1.92=$30.72
Tipping on the total (what you did)
8% of $24 is $1.92
New total is $25.92
20% of $25.92 is $5.18
$25.92 + $5.18 = $31.10