Here is the interesting part. The way how they wrote it is because expand the denominator and then you will have

.
Notice the

terms at all it is simply

which will simplify to 2 and then knowing that

we will simplify

. How did we get this you might be wondering

well the two comes from

you know multiplying the denominator by 2 because we are assuming that both the numerator and the denominator are

so therefore how we got this part

is really just a balancing act to get the desired fraction on the LHS.
If you are finding anything confusing here feel free to reply to the message requesting a further explanation and someone will help you out.