well if 420 mi on 12 gal of gas you have to find how many mi he can drive on 1 gal of gas so 420/12 = 35 so 35 mi on 1 gal of gas,
next we have to find how many gal of gas it takes to drive 595 mi so we have to do divide 595 by 35 which is 17 then add 17 to that 1 gal of gas so it will take 18 gal of gas to drive 595 mi
hope this helped :)