The school has to sell each box for $40 to make a profit of $10 per box because each box costs $30.
There are 50 candy bars per box.
$40/50=$0.80 per candy bar
It's costing the school $30/50=$0.60 per candy bar to buy.
The school sells each candy bar for $0.80, making a profit of $0.20 per candy bar.
50*$0.20=$10.00