Well sqrt(x)/sqrt(y) and sqrt(x/y) are not the same function (they have different domains).

Generally the domain of sqrt(f(x))/sqrt(g(x)) is a subset of the domain of sqrt(f(x)/g(x)), and they are typically not equal.

As an exercise, compare the domains of
sqrt(x^2-2x+3)/sqrt(x^2+2x+3) and
sqrt((x^2-2x+3)/(x^2+2x+3)).