Assuming L is a constant you can use the quadratic formula. Because L is a constant it can be incorporated into

In your case:

The plug those into the quadratic formula to find x in terms of L:

simplify for L

Oneof the solutions is

There will be another solution though because of the plus/minus