Initially, 1/4 of the tank was filled.
After adding 12 gallons, it was 3/4 full.
Increase in fuel filled portion =

So 2/4 of the tank = 12 gallons
1/4 of tank = 12 ÷ 2 = 6 gallons
4/4 of tank = 6×4 = 24 gallons
____________________
Portion remaining to be filled =

Fuel needed = 1/4 × 24 = 6 gallons
So you need 6 more gallons to fill the tank