This problem is shown to be really comical when you work it the following way!
LOL! J
Suppose each box were to contain 30 caramels and no cremes.
Then the profit would be $12.50 - 30($0.25) = $5.00 per box.
But they would be making too much profit that way! (LOL). They only want to make
$3.00 profit per box. So they need to swap some of those caramels for cremes to
reduce their profit down to only $3.00 per box instead of $5.00 per box.
Let x be the number of caramels they need to remove from each box and replace
with x cremes in order to reduce their profit from $5 down to only $3.
Since each creme costs $0.45 and each caramel $0.25, their profit will reduce
by $0.45-$0.25 = $0.20 per swap.
Since they will be making x swaps they will be reducing their total profit by
$0.20x.
So after 10 swaps, each box will contain 10 cremes and 20 caramels. Then,
they'll have their lower profit of only $3 per box. J
Edwin