If you’re going up a 150’ hill, that implies that at some point (either immediately, or on the trip home) you’ll be going down a 150’ hill. Therefore, the variable of extra effort your engine makes to get up the hill is canceled out by going down the hill, and the only thing that matters is 2.7 vs. 3.5 miles.
You’re going to get better mileage driving up/down the hill. The 3.5 miles of extra driving in your vehicle is going to cost you about 1/6th of a gallon. To climb 150’, if the road is rather conventional and climbs at a modest rate, there is no way your car is asking for fuel at a clip that uses 1/6th of a gallon, especially if you consider you realize a savings coming down the hill. You don’t save as much coming down as you burn going up (thanks, physics), but it’s not real drastic.
Variables are: the gearing and shift habits of you or your car. Going up/down the hill will burn a scant am’t of fuel vs total flat terrain, but no way it’s burning 1/6th of a gallon extra, because you get savings coming back down. Done right, by you and your car, you will have burned a very small fraction in total – almost negligible were you to attempt a physical measurement. Contrast that with your detour. 1/6 of a gallon would be revealed somewhat easily in a physical measurement.
Hill: Look at the fuel in a container. You can barely notice a difference, as you saved (downhill) almost as much as you burned (uphill).
Detour: Look at the fuel in a container compared to the above test… and you’ll be able to see 1/6th of a gallon gone.
This is only true if you coast down the hill without using your brakes. If the downhill portion is steep enough that you need to ride the brakes, then all the effort of going up the hill is dissipated by the brakes.
If he rides the brakes all the way down he still travels that far at idle engine RPMs and fuel consumption. Some late model cars will turn the fuel off entirely and just let the engine spin. Which still powers all the engine-mounted accessories and provides all the normal engine braking, but with zero fuel consumption.
Conversely if he had driven the same downhill distance horizontally he’d have burned more fuel overcoming air drag. This will be true whether the downhill engine is fuel-off or idling.
So you’re right that *some *of the potential energy that he burned fuel to create on the uphill will be wasted in the brake system on the way down. But not *all *of it.
I’m reading the OP as being 0.8 extra miles of driving, not 3.5 extra. (Point B is either 3.5 miles via hill detour or 2.7 miles via going over the hill.)
Hill climb, if gentle, may use less energy than wind resistance and rolling resistance, so the hill adds less than you think to the load. The formula would depend on the aerodynamcs of your vehicle.
The engine is typically most efficient (in terms of fuel consumed/energy output) at nearly full-throttle and intermediate RPM. There are a bunch of sample brake specific fuel consumption charts here, showing that peak efficiency is usually around 2k-3k RPM and 80%-100% throttle, though the exact peak varies between engines. Taken to the extreme, flooring the gas pedal at low RPM to accelerate, then coast, then accelerate again is more efficient than just cruising at a steady speed (but don’t do that with any other drivers around you!)
Now to go back to the OP’s question, when you’re climbing a hill the engine is probably operating near peak efficiency. Then, when you coast downhill, you’re using little or no fuel, so now you’re just using the potential energy you generated efficiently on the climb.
In the real world I’ve found that driving on very hilly side roads and rural highways is more efficient than cruising on the interstate. And with a manual transmission, you can use engine braking on the downhill so there’s not even idle gas consumption and less brake wear and heating.
The shortest distance is always best, especially because you are aware and working with efficiency in mind, therefore climb any grades slowly, and take all downhills with max coasting. The offset between what you burned going up and what you saved coming down will be negligible.
All other things begin equal, e.g., you’re not experience more traffic on the hilly part; you’re not running into additional lights; you’re not getting bogged down by numerous stop signs… then favor the shortest distance, drive conservatively uphill and be aware that you can get most hill-climbing losses back on the downhill.
That’s not surprising, since hybrids and CVTs don’t behave how I explained above. Both typically keep the engine constantly running near peak efficiency. Hybrids in particular keep the engine closer to optimal RPM and throttle: when you need extra power it’s provided by the electric motors, and when the engine produces excess power it’s used to charge the battery. That means there’s no need for a bigger-than-necessary engine that usually operates under peak efficiency. As a bonus the hybrid’s engine only has to be optimized for a comparatively narrow range of operating conditions.
In western Pennsylvania we bore tunnels through the mountains. You’d think this would improve efficiency, however drivers slow down in the tunnels, creating traffic jams.