We differentiate the LHS with the chain rule:

We differentiate the RHS with the usual power rule:

f is just the combined constants. Equating both sides and canceling the 2, we get

We still have a free , so we need to replace it with an expression derived from the first equation.

And I think you are done.