In this problem you have 2 variables and 1 fixed value -- the variables are D and x , note the L is a fixed value.
dD/dx = 8x^3 - 15Lx^2 + 6(L^2)x
this is a quadratic form if you take the common factor of x out of it, the max or min occurs when dD/dx =0
then do the second derivative to confirm the max or min....
hope this helps.