What did they do at the part that I circled in red?????
they factorize x^2 under the radical, take it under the radical(having x^2 under the radical, or xx, you get only x out of the radical), and after that, divide the numerator and the denominator by the highest degree of x found in the denominator, which is x (that one one we got when taking it from under the radical)...
is it somewhat clear?
dokrbb