A much more difficult question than it appears.
A cable would hang in the form a catenary, from the Latin catena = chain
the general equation of a catenary is
y = (a/2)( e^(x/a) + e^(-x/a)
so imagining our cable on the x-y grid,
the lowest point would then be (0,5) giving us
5 = (a/2)(1 + 1)
a = 5
so the equation is y = (5/2)(e^(x/5) + e^(-x/5))
the end points are (x,20) and (-x,20)
sub in y = 20
20 = (5/2)(e^(x/5) + e^(-x/5))
8 = e^(x/5) + e^(-x/5)
Nasty equation to solve, lately I have been using Wolfram to solve such difficult equations.
it gave as solutions x = 5ln(4+√15) and x = 5ln(4-√15)
5ln(4+√15) = appr. 10.317
so the distance between them is 2(10.317) = 20.63 ft
The fact that the cable is 30 ft long appears to be redundant information.
One would need to use integral calculus and the formula for the "length of a curve" to show that it is actually 30 feet.
I looked at this question again, because I thought that I was "overthinking" it.
I think the problem is flawed.
Suppose the two poles are flush against each other, then the chain would reach 15 feet down each of the poles, that is, it would end up 5 feet above the ground.
As soon as the poles are pulled apart, the lowest point of 5 feet would then rise.
So for the given data of the cable being 30 feet, the distance between the two poles would have to be zero.
Drop a 30 ft cable from the top of a 20ft pole. Tie it at 5ft above the ground and take it back up the pole. How far do you go?
15ft down and 15ft up. The poles have to meet at the top.
The equation is flawed in that it does not state whether the poles are parallel to one another and perpendicular to the ground. In fact, the poles migh be flat on the level ground and stretched 30ft apart. The poles might be 5ft in diameter and the cable attached to the high side of the diameter. Etc... not enough information.