ANSWER:
264 gallons of milk containing 8% butterfat
132 gallons of milk containing 2% butterfat
STEP-BY-STEP EXPLANATION:
From the statement we can propose the following system of equations:
Let x be the milk that contains 8% butterfat and let y be the 2%.
[tex]\begin{gathered} x+y=396\rightarrow y=396-x\text{ (1)} \\ 0.08x+0.02y=0.06\cdot396\rightarrow0.08x+0.02y=23.76\text{ (2)} \end{gathered}[/tex]We substitute in equation (1) in equation (2) and substitute for x, just like this:
[tex]\begin{gathered} 0.08x+0.02\cdot(396-x)=23.76 \\ 0.08x+7.92-0.02x=23.76 \\ 0.06x=23.76-7.92 \\ x=\frac{15.84}{0.06} \\ x=264 \end{gathered}[/tex]Knowing the value of x, we can calculate the value of y, substituting in equation 1, like this:
[tex]\begin{gathered} y=396-264 \\ y=132 \end{gathered}[/tex]Therefore, 264 gallons of milk containing 8% butterfat and 132 gallons of milk containing 2% butterfat are needed.