Consider the square of side s and a point inside the square that is respective distances of 5, 8, and 13 from three of the vertices.



Consider a 90 degree rotation of the triangle at the top of the  -- two of the sides are of length 5 and 8.  Make the center of rotation the upper left vertex of the square and the image of the top of the square will lie along the left side.

Connect the two points:

Now, we have an isosceles right triangle with sides of 8, 8, and and also other triangles so we can solve for various angles and lengths, etc.

Return to problem: Distance to Nearest Road