A chemical company mixes pure water with their premium antifreeze solution to create an inexpensive antifreeze mixture. The premium antifreeze solution contains 70% pure antifreeze. The company wants to obtain 140 gallons of a mixture that contains 40% pure antifreeze. How many gallons of water and how many gallons of the premium antifreeze solution must be mixed?

Let x be the number of gallons of pure water.

So the number of gallons of the premium antifreeze solution is 140 - x.
Then the amount of pure antifreeze in the water is 0% * x = 0 gallons.
The amount of pure antifreeze in the premium antifreeze solution is 70% * (140 - x) = 98 - 0.7x gallons.
The amount of pure antifreeze in the mixture is 40% * 140 = 56 gallons.
So 0 + 98 - 0.7x = 56.
Combining like terms, we get 98 - 0.7x = 56
Subtracting 98 from both sides, we get -0.7x = -42
Dividing both sides by -0.7, we get x = 60
So the number of gallons of pure water is 60 and the number of gallons of the premium antifreeze solution is 140 - 60 = <<140-60=80>>80. Answer: \boxed{60}.