Question 8422
First, consider how much anti-freeze is in the cooling system. The system holds 5 gallons and 40% of the fluid in the system is anti-freeze so there are 0.40*5 or 2 gallons of anti-freeze currently in the cooling system.

Next, consider how much anti-freeze you will have in the cooling system, when 50% of the fluid is anti-freeze. Fifty percent of 5 gallons is 0.50*5 = 2.5 gallons. So, when you have completed the problem, you should have 2.5 gallons of anti-freeze in the 5 gallons of fluid.

Now, you have to withdraw some of the coolant to make room for the 100% anti-freeze you are about to add, so let's call this amount x. When you withdraw x gallons from the system, you are left with 5 - x gallons of fluid. So, how much anti-freeze do you have in the system after you've withdrawn the x gallons? The solution is still 40%, so you will have 0.40*(5 - x) gallons of anti-freeze. Add x gallons of pure anti-freeze to give yourself a total of 5 gallons. In other words, you will have 0.40*(5 - x) + x gallons of anti-freeze in the cooling system when you are done. We'll call 0.40*(5-x) + x "the anti-freeze expression."

We know we want 2.5 gallons of anti-freeze in the system, so we know the anti-freeze expression must equal 2.5 gallons. In other words,

0.40*(5 - x) + x = 2.5

Now do the algebra:

0.40*(5 - x) + x = 2.5
2 - 0.40x + x = 2.5
2 + 0.6x = 2.5
0.6x = 0.5
x = 0.5/0.6 = 5/6

You have to remove 5/6 of a gallon of the original fluid and replace it with pure anti-freeze.

You can verify this pretty quickly. First, subtract 5/6 of a gallon from the 5 gallons of fluid. You will have 0.4*(4 1/6) = 0.4(25/6) = 10/6 gallons of anti-freeze remaining in the system. Next, add 5/6 gallons of pure anti-freeze and you will have:

10/6 + 5/6 = 15/6 = 2.5 gallons of anti-freeze. In otherwords, you will have a mixture of 50% anti-freeze.