Draw a figure!
In order for the distance from the junction box to each farm to be equal, the junction box must lie on the perpendicular bisector of the distance between the farms.
Let x be the distance from the farm road to the junction box.
Then 20-x is the distance from the junction box to the highway.
The distance from the junction box to each farm is sqrt(25+x2)
W, the amount of wire needed is 20-x + 2sqrt(25+x2)
dW/dx = -1 + 2x/sqrt(25+x2) = 0 (at the minimum if there is one).
sqrt(25+x2) = 2x
25 + x2 = 4x2
x = (5/3)√3 and the distance from the highway is 20 - x.