Jim's house to the corner is A. Adam's house to the corner is B. Adam's to Jim's is C.
(AxA)+(BxB)=(CxC).
(15x-7)(15x-7) = 225x^2-210x+49 = (AxA)
(23x-2)(23x-2) = 529x^2-92x+4 = (CxC)
(CxC)-(AxA) = (BxB)
529x^2-92x+4-225x^2-210+49 = 304x^2-118x-45
so (BxB) = 304x^2-118x-45
now we would factor that expression but this one isn't factorable.
so your final answer for the distance from Adam's house to the corner is the square root of 304x^2-118x-45.