Hello, quasar. I don't think using square root function is a good method, since you don't know whether to take the positive or negative square root. For more difficult case, you may not be able to find the inverse function.
To differentiate f(x) w.r.t g(x), just do the following:
[tex]\frac{d f(x)}{d g(x)}[/tex]
[tex]=\frac{d f(x)}{d x}\frac{d x}{d g(x)}[/tex]
[tex]=\frac{d f(x)}{d x}\left(\frac{d g(x)}{d x}\right)^{-1}[/tex]
David, for your problem, you just put:
[tex]f(x)=8 \ln x -9x[/tex] and [tex]g(x) = x^2[/tex], and you will have the answer:
[tex]\frac{\frac{8}{x}-9}{2x}[/tex]
[tex]=\frac{8-9 x}{2 x^2}[/tex]