Question 845360
One would figure that the 3 dollar profit comes from the selling price, so the non-profit part of the selling price is $9.50.  


x for count of creme pieces
y for count of carmel pieces


Accounting for price:  {{{0.45x+0.25y=9.50}}}
Accounting for total pieces per box:  {{{x+y=30}}}


This is a system of two linear equations with two unknowns.
Multiply the price equation by 20.
{{{9x+5y=190}}}.


SOLVE THE SYSTEM:
-------------------------
x+y=30
-------------------------
9x+5y=190
-------------------------


Elimination Method, factor of 5 upon the piece count equation,
{{{9x+5y-(5x+5y)=190-150}}}
{{{4x=40}}}
{{{highlight(x=10)}}} and from this, {{{highlight(y=20)}}}.
-
ANSWER:  10 creme pieces and 20 carmel pieces.