Since
#color(white)("XXX"color(red)()9-1/x^(-2))#
#color(white)("XXXXXX")=color(red)(9-1/(x^2))#
#color(white)("XXXXXX")=color(red)((9x^2-1)/(x^2))#
and
#color(white)("XXX")color(blue)(3+x^(-1))#
#color(white)("XXXXXX")=color(blue)(3+1/x)#
#color(white)("XXXXXX")=color(blue)((3x+1)/x)#
#color(red)((9-1/(x^2)))/color(blue)((3+x^(-1)))#
#color(white)("XXX")=[color(red)((9x^2-1)/(x^2))]/[color(blue)((3x+1)/x)]#
#color(white)("XXX")=(9x^2-1)/(x^2)*x/(3x+1)#
#color(white)("XXX")=((3x+1)(3x-1))/(x*x)*x/(3x+1)#
#color(white)("XXX")=(cancel((3x+1))(3x-1))/(cancel(x)*x)*cancel(x)/cancel((3x+1))#
#color(white)("XXX")=(3x-1)/x#
#color(white)("XXX")=3-1/x#