A car travels a certain distance at a constant speed. If the car had traveled 10 miles per hour faster, it would have taken 2 hours less to cover the same distance. The car's current speed is 40 miles per hour. What is the total distance traveled by the car? Let's think step by step and output the final answer within \boxed{}.
user