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