If you walk for half an hour at 3 mph, you will have walked 1.5 miles.
If you run for 15 minutes at 7 mph, you will have ran 1.75 miles.
These together is halfway, so the equation is
2 x (1.5 + 1.75) = d
Add 1.5 and 1.75 together.
2 x 3.25 = d
Multiply 2 by 3.25.
6.5 = d
It is 6.5 miles to town, hope this helps!