A B C D E F 500ft <-> 500ft <-> 500ft <-> 500ft <-> 500ft <-> 2000ft
Let's say the bus stops at A = 0 ( from A ) + 500 ( from B ) + 500 + 500 ( from C ) + 500 + 500 + 500 ( from D ) + 500 + 500 + 500 + 500 ( from E ) + 500 + 500 + 500 + 500 + 2000 ( from F ) = 0 + 500 + 1000 + 1500 + 2000 + 4000 = 9000 ft
at B = 500 ( from A ) + 0 ( from B ) + 500 ( from C ) + 500 + 500 ( from D ) + 500 + 500 + 500 ( from E ) + 500 + 500 + 500 + 2000 ( from F ) = 500 + 0 + 500 + 1000 + 1500 + 3500 = 7000 ft
at C = 500 ( from A ) + 500 + 500 ( from B ) + 0 ( from C ) + 500 ( from D ) + 500 + 500 ( from E ) + 500 + 500 + 2000 ( from F ) = 500 + 1000 + 0 + 500 + 1000 + 3000 = 6000 ft
Do the same for D , E and F
at D = 6000 ft
at E = 7000 ft
at F = 15000 ft
You will find that the bus should stop at either C or D to make the sum of distances from every house to the stop as small as possible.