
Hello! Sorry about the maybe dumb question. I am a university student taking Calculus 2 next semester. I took calc 1 about 3 years ago but have done hardly any math since then. I have spent the summer trying to relearn calc 1 and I have found that while I'm not struggling with the concepts, I've forgotten A LOT of my more basic arithmetic and algebra skills. I am working on the above question and I have the correct answer however I can't figure out how to simplify it.

The first equation is where I arrived on my own. The second equation shows the simplification I should get but I cant understand how to get from the first equation to the second - particularly how the first fraction in the numerator ended up in the denominator and how the second root x became 2x. Any explanation on simplifying fractions would be awesome.