Modulous problem (maths, not programming)

I have a little problem with a little maths question thats bugging me. We have a test on monday for this stuff so I don't have chance to ask my teacher before the test.

Four computer terminals (A,B,C,D) are located along a wall. A server is located at some point x along the wall and *seperate cables go to each computer*.

Heres a diagram:

Code:

` A B C D`

-------------------------------------------------------- wall...

-6 -2 0 3 5

(a) Explain why the total length of cable needed is

|x+6| + |x+2| + |x-3| + |x-5|.

(b) Where should the server S be located to minimize the total length of the cable.

I know for (b) I can just draw it on a calculator and find the minimum, but I don't get how in (a) its |x-3| and |x-5|, I would have expected it to be |x+3| because its the length... :confused:

Any explanations would be really appreciated.