The question is worded poorly, but it looks like you have a lever in equilibrium, with a force x at a distance d from the fulcrum, and a force y at a distance L - d from the fulcrum. You already have the equilibrium formula for this situation:
xd = y(L - d)
If you know x, y, and d, you can solve for the length L.