Left f(x) = 1/x+2 and g(x) = x-1/x. Simplify as much as possible and sstate the domain.

f 0 g(x)
g 0 f(x)

Assuming that f and g are as written, and need no parentheses (since (x-1)/x is kinda dumb),

f◦g = 1/g + 2 = 1/(x - 1/x) + 2 = 2 + x/(x^2-1)

g◦f = f - 1/f = (1/x + 2) - 1/(1/x + 2) = (x+1)(3x+1)/[x(2x+1)]

domain is all reals except where the denominator is zero.