The new pipes should form a Y shape, with one end leading to the existing water pipe and the other two ends leading to the two houses.
The point in (or in some cases out) of a triangle that minimizes the sum of the distances to each vertex is called the Fermat Point. I won't get into how to find it, but a property is that the lines it makes to the three vertexes form three 120° angles.
For more information, see the Wikipedia entry on the Fermat Point.
The answer is approximately 6.83012701892219 miles.
Here is my solution (PDF).