1 gallon gasoline contains 31 million small calories, while the human caloric requirements are given in large calories. 1000 small calories = 1 large calorie. So the calculations are off by a factor of 1000. The confusion stems from the fact that both are commonly referred to as "calories", for some stupid reason.
So in reality you would have to drink another gallon in just 2-3 weeks.
Everything you said was correct, except the last sentence. Still pretty sure drinking a gallon of gasoline would be enough to last you your entire life.
The maths a little off, it wont last him 30+ years; but he's absolutely correct with that final statment. If he chugs a gallon of gasoline; he won't need to eat for the rest of his life.
So based on a random articles I found in internet, mass density of vegetable oil is around 900kg/m^3, and gasoline 800kg/m^3, and since we know that E (energy) equals to m (mass) times c^2 (speed of light squared), we can tell that veggie oil indeed is more energy dense than gasoline.