In the first stretch he drove 80 miles/hour x 6 hours = <<80*6=480>>480 miles
In the second stretch he drove 60 miles/hour x 4 hours = <<60*4=240>>240 miles
After the gas station he drove 40 miles/hour x 2 hours = <<40*2=80>>80 miles
In total he drove 480 miles + 240 miles + 80 miles = <<480+240+80=800>>800 miles
#### 800