Answer
a) $24( 5 - x ) + 28x = 132$
b) $\$4$
Work Step by Step
Let's say $w$ cans of white paint and $b$ cans of blue paint were bought. Since $5$ cans were bought in total,
$$\begin{align}
w + b &= 5\\
w &= 5 - b \text{ (subtract }b \text{ from both sides)}.
\end{align}$$ Now, white paint can costs $24$ per can while blue costs $28$ per can. Total cost was $\$132$. Thus $$24w + 28b = 132.\tag{1}$$ Substituting $5 - b$ for $w$ we have $$24( 5 - b ) + 28b = 132.$$ We solve the equation for $b$:
$$\begin{align}
120 - 24b + 28b &= 132 \text{ (distributive property)}\\
120 + 4b &= 132 \text{ (simplify)}\\
4b& = 12 \text{ (subtract }120 \text{ on both sides)}\\
b& = 3 \text{ (divide both sides by }4).
\end{align}$$ Substitute this value for $b$ in $w = 5 - b$ to find $w$ $$w = 5-3 = 2.$$ therefore $2$ white cans and $3$ blue cans were bought.
b) If colors were reversed, number of cans bought were reversed, then $3$ white cans and $2$ blue cans would be needed.
Then the cost will be $24w + 28b$ (from equation $(1)$ of part a).
Substituting values for $w = 3$ and $b = 2$ $$24\cdot 3 + 28\cdot 2 = 72 + 56 = 128.$$ The original cost was $132$. So we would have saved $132-128$, which is $4$ dollars.