To write an equation to represent this problem, we start by defining what each term means:
- \( c \): the number of containers of cookies to sell
- $28: total cost of ingredients to make the cookies
- $4: price charged per container of cookies sold
- $20: desired profit from selling the cookies
We want the total revenue from selling \( c \) containers of cookies to cover the cost of ingredients and our desired profit. The revenue from selling \( c \) containers at $4 each is \( 4c \). We subtract the cost of ingredients from this revenue, and we want the remainder to equal the desired profit.
So our equation will be:
\[ \text{Total revenue} - \text{Cost of ingredients} = \text{Desired profit} \]
\[ 4c - 28 = 20 \]
Solving this equation, we add 28 to both sides to isolate the \( c \) term on one side:
\[ 4c = 20 + 28 \]
\[ 4c = 48 \]
Now, to solve for \( c \), we divide both sides by 4:
\[ c = \frac{48}{4} \]
\[ c = 12 \]
So you need to sell 12 containers of cookies to earn $20 in profit.