Check #f(g(x))#:
Start with #f(x)#:
#f(x)=(3-x)/x#
Substitute #g(x)# for for every x in #f(x)#:
#f(g(x))=(3-g(x))/g(x)#
Substitute the right of #g(x)=3/(x+1)# into every #g(x)# on the right side of the above equation:
#f(g(x))=(3-3/(x+1))/(3/(x+1))#
Multiply the right side by 1 in form of #(x+1)/(x+1)#:
#f(g(x))=(x+1)/(x+1)(3-3/(x+1))/(3/(x+1))#
This makes the embedded denominators disappear:
#f(g(x))=(3(x+1)-3)/3#
There is a common factor of #3/3# that becomes 1:
#f(g(x))=x+1-1#
#f(g(x))=x#
Check #g(f(x))#
Start with #g(x)#:
#g(x)=3/(x+1)#
Substitute #f(x)# for every x:
#g(f(x))=3/(f(x)+1)#
Substitute the right side of #f(x)=(3-x)/x# for every #f(x)# on the right side of the above equation:
#g(f(x))=3/((3-x)/x+1)#
Multiply by 1 in the form of #x/x#:
#g(f(x))=x/x 3/((3-x)/x+1)#
This makes the embedded denominator disappear:
#g(f(x))= (3x)/(3-x+x)#
#-x + x# becomes 0:
#g(f(x))= (3x)/3#
#g(f(x))= x#
Both are true, therefore, they are inverses.