To make the writing much easier, let

math expression math expression math expression math expression

So the equation becomes:

math expression and we need to solve for x.

Add A to both sides; subtract math expression from both sides:

math expression

and then square both sides:

math expression

math expression

We now re-express it in the original notation:

math expression

There is no need to expand out the last bracket on the RHS.