Solve for L

L^2*pi*a- 2L*pi*x + pi*x^2=0

L^2*pi*a- 2L*pi*x + pi*x^2 = 0

first we can factor out pi from all terms and cancel it out:
pi*[ L^2 * a - 2Lx + x^2 ] = 0
L^2 * a - 2Lx + x^2 = 0
a*L^2 - 2x*L + x^2 = 0
since it looks like a quadratic equation now (where L is the variable), we can use quadratic formula to solve for L:
L = [ -b +- sqrt(b^2 - 4ac) ] / (2a)
where
a = a
b = -2x
c = x^2
substituting,
L = [ 2x +- sqrt(4x^2 - 4ax^2) ] / 2a
L = [ 2x +- sqrt((4x^2)(1 - a) / 2a
L = [ 2x +- 2x*sqrt(1-a) ] / 2a
L = [ x +- x*sqrt(1-a) ] / a

therefore there are two answers for L:
L = [x + x*sqrt(1-a)]/a
L = [x - x*sqrt(1-a)]/a

hope this helps~ :)