Multiply it all out, take the derivative, set it equal to 0 and solve for x.

Take the 2nd derivative and evaluate it at each of these points.

Doing this you find 3 stationary points. 2 are minima, 1 is a local maxima.

You can work out the details.