You would want to put the function of f(x) into all of the x in g(x), so that
\(-3(x-7/x+3)-7/(x-7/x+3)-1\)
Then you simplify and convert the constants into fractions of same value.
\(((-3x+21/x+3)-(7x+21/x+3))/(x-7/x+3)-(x+3/x+3)\)
simplify
\((-10x/x+3)/(-10/x+3)\)