So to compare boxes, you want to convert both to price per ounce unit.
So for smaller box, we have ratio $2.89 / 17 ounces which can be reduced to $0.17 per ounce. You just divide 2.89 by 17.
Now for larger box, we have ratio $3.29 / 24 ounces which can be reduced to approximately $0.14 per ounce. 0.137083333... to be exactly.
Larger box has smaller ratio compared to smaller box therefore larger box the is better buy.
The difference per ounce is 0.17 - 0.137083333... = 0.03291666... so that's 3.3 cents cheaper per ounce.
Final answer: The larger box is the better buy because it is approximately 3.3 cents cheaper per ounce.