Note that both the denominator and the numerator are of the form of w'Aw, where w' is the transpose of w. Let f(w) = w'Aw, calcuate the differential like this:

Let t be a real number and x be a vector, then

f(w+tx) = (w'+tx')A(w+tx) = f(w) + tw'(A+A')x + o(t)

Thus the linear map df(x) = w'(A+A')x is the differental of f at the point w.

For your case, L = f(w)/g(w), where f(w) = w'(a*a')w, g(w) = w'(B+C)w

dL(x) = [df(x)g(w) - f(w)dg(x)] / [g(w)]^2

let dL = 0, we get df(x)g(w) = f(w)dg(x) for any vector x.

Solve this you'll get the answer.