Using ethanol save fossil two ways:
(1) One quarter of the energy in ethanol comes from corn, nuclear and hydro (mostly corn).
(2) Replacing a gallon of gasoline replaces about one quarter more energy than in the gallon, becasue fossil used to make gasoline.
The energy in a gallon of gasoline is called 1 GGE of energy.
Making and using 4 GGE of ethanol requires 3 GGE of fossil fuel, but saves the (almost) 5 GGEs of fossil fuel needed for the 4 gallons of gasoline replaced.
This means, 4 GGE of ethanol saves 2 GGE of fossil fuel.
But ethanol has only 2/3 the energy of gasoline, so 4 GGEs of ethanol is 6 gallons of ethanol. It takes 6 gallons of ethanol to save 2 GGE, the energy in 2 gallons of gasoline.