
Actually Welcome to the Concept of the Rationalization.
The one thing we need to remember is that, to do rationalise, we just have to multiply the conjugate of the denominator to both the numeration and denominator itself, hence we get as,
above attached.