Let x be the needed volume of 50% antifreeze solution. x gallons of this solution contains 0.50x gal of antifreeze.
Mixing this amount with 90 gal of 25% solution makes a total volume of (x + 90) gal of solution.
90 gal of 25% solution contains 0.25 (90 gal) = 22.5 gal of antifreeze.
The new mixture would then consist of (0.50x + 22.5) gal.
If its concentration of antifreeze is supposed to be 40%, then
(0.50x + 22.5)/(x + 90) = 0.40
Solve for x :
0.50x + 22.5 = 0.49 (x + 90)
0.50x + 22.5 = 0.49x + 44.1
0.01x = 21.6
x = 2160