A dairy needs 280 gallons of milk containing 7% butterfat how many gallons each mil containing 8% butterfat and mil containing 4% butterfat must be used to obtain the desired 280 gallons

Let x be the number of gallons of milk containing 8% butterfat.

Then 280 - x is the number of gallons of milk containing 4% butterfat.
We know that the total butterfat in the mixture is equal to the sum of the butterfat in each component. In other words, the butterfat in the 8% component plus the butterfat in the 4% component is equal to the butterfat in the final mixture.
So, 0.08x + 0.04(280 - x) = 0.07(280).
Now let's solve this equation:
0.08x + 0.04(280 - x) = 0.07(280)
0.08x + 11.2 - 0.04x = 19.6
0.04x = 8.4
x = 210
So, 210 gallons of milk containing 8% butterfat must be used, and 280 - 210 = 70 gallons of milk containing 4% butterfat must be used. Answer: \boxed{210, 70}.