Hey kitchenbreak.

If we have waste of 20% then per kg this is 10.00 * 0.2 = $2.00 per kg. Now this is sold at half price so the final waste of the product (that can't be recovered) is $2.00 - $2.00 * 0.5 = $1.00 per kg.

So over-all we waste $1.00 per kg for every kg we buy if we buy it at $10.00 per kg.

So now we need to figure out how much chocolate is needed and then consider the rebate we get when we sell the waste for half price (relative to purchase price).

If we waste 20% then it means that buying z amount of chocolate and wasting 20% will leave the total amount in the product which is 0.9kg. So 0.8z = 0.9 so x = 0.9kg/0.8 = 1.125kg and at $10.00 per kg we get the cost as $11.25. To check the weight 20% of 1.125 is 0.225 and 1.125-0.225=0.9 as expected.

So the total cost is $11.25 and the waste is 0.225kg which means the cost of this waste before selling is 0.225kg * $10.00 per kg = $2.25.

The company will get back half of this by selling it at a reduced rate which means the rebate is 50% of $2.25 = $1.12 (roughly rounded down).

Now the total cost was $11.25 for ingredients but they got a rebate of $1.17 for selling off the waste at half price which means total cost is $11.25 - $1.12 or $10.13 as expected.