Use the diagram to write the total length of cable required as a function of x (the x-value on the x-axis where the cable splits into a "Y"). Then take the derivative of the length function, set it = 0, and solve:
Horizontal length: (9-x) Diagonal lengths: √(x2+16) by pythag thm
L(x) = 2·√(x2+16) + 9 - x
L'(x) = 2x / √(x2+16) - 1 = 0
4x2 = x2 + 16
x2 = 16/3 and x = 4/√3