Miguel drove to the mountains last weekend. There was heavy traffic on the way there, and the trip took 10 hours. When Miguel drove home, there was no traffic and the trip only took 7 hours. If his average rate was 18 miles per hour faster on the trip home, how far away does Miguel live from the mountains?

Do not do any rounding.

Let's call the distance Miguel lives from the mountains "d".

We know that the time it took Miguel to drive to the mountains (with heavy traffic) was 10 hours. We don't know his speed during this time, so let's call it "x" (in miles per hour).
Using the formula distance = rate x time, we can write an equation for the distance Miguel traveled to the mountains:

d = x * 10

We also know that when Miguel drove home (with no traffic), it only took him 7 hours. We also know that his average speed during this time was 18 mph faster than his speed during the trip to the mountains. So his speed on the trip home was x + 18 mph. Again using the distance = rate x time formula, we can write an equation for the distance Miguel traveled on the way back:

d = (x + 18) * 7

Now we have two equations for "d", so we can set them equal to each other and solve for x:

x * 10 = (x + 18) * 7

10x = 7x + 126

3x = 126

x = 42

So Miguel's speed during the trip to the mountains was 42 mph, and his speed on the way back was 42 + 18 = 60 mph.

Now we can use either of the original equations to find the distance "d":

d = x * 10 = 42 * 10 = 420 miles

So Miguel lives 420 miles away from the mountains.

Let's assume the distance from Miguel's home to the mountains is "D" miles.

On the way there:
Time taken = 10 hours,
Average rate = D/10 miles per hour.

On the way back:
Time taken = 7 hours,
Average rate = D/7 miles per hour,
which is 18 miles per hour faster than the average rate on the way there, so we can write the equation:
D/7 = D/10 + 18.

To solve this equation, we can multiply both sides by 70 to eliminate the denominators:
10D = 7D + 1260.

Subtracting 7D from both sides:
3D = 1260.

Dividing both sides by 3:
D = 420.

Therefore, Miguel lives 420 miles away from the mountains.