Please help me with this problem, I got a solution but I don't think it's correct.

A, B and C are computers. A Printer needs to be connected to each of them. Where does P need to be placed in order to minimize the total cable length AP + BP + CP?

Sketch:

[img=http://img233.imageshack.us/img233/1386/sketchml6.th.jpg]
The equation I got is:

Square root of (4² + P²) + Square root of (5²+ P²) + 8-P.

However, this does not seem to be correct and if I try to find the minimum I get strange values. Please tell me my mistake and help me. Thank you very much for your help.

There's another similar problem, but the coordinates confuse me. P has to be on the line and the question is where to place P so that the sum of the length of the lines from AP BP and CP is as short as possible.