Suppose x amount of 7% and y amount of 2% be used to make 375 gallon of 5%.
Thus total amount will be:
x+y=375
⇒y=375-x.......i
also:
0.07x+0.02y=(375×0.05)
0.07x+0.02y=18.75...ii
substituting i in ii we get:
0.07x+0.02(375-x)=18.75
0.07x+7.5-0.02x=18.75
putting like terms together and simplifying we get:
0.05x=11.25
x=225 gallons
hence
y=375-225=150 gallons
thus
225 gallons of 7% and 150 gallons of 2% should be used.