Two towns, A & B, are 5 miles apart. It is proposed to build a school to serve 300 students in town A and 700 students in town B. How far from town A should the school be built if the total distance traveled by all 1000 students is to be as small as possible?