We know the inverse functon identity:
$$ f(g(x) ) = x$$
then,
$$ \frac{df(g)}{dg} \frac{dg(x)}{dx} = 1$$
However, if we have
$$ q(x) = \frac{df(x)}{dx}$$
Is,
$$ q(g) = \frac{df(g) }{dx} = \frac{df(g)}{dg} \frac{ dg}{dx} \tag{1}$$
What's wrong with the above equation?
Consider a counter example for (1):
$$ f = 2x \tag{2}$$
And,
$$ g = \frac{x}{2} \tag{3}$$
Combining (2) and (3),
$$ f= 4 \frac{x}{2} = 4g$$
Notice that
$$ \frac{df}{dg} \frac{dg}{dx} = 2 \neq 1$$
What went wrong?
Tl;dr Is plugging inverse then derivative equal to derivative then plugging in inverse? Why/ why not?
Well your counter example doesn't make sense .There is a diffrence between $\frac{df}{dg}\frac{dg}{dx}$ and $\frac{df(g)}{dg}\frac{dg}{dx}$ In case of your example $$f(x)=2x,g(x)=x/2$$ $$\Rightarrow f(g)=2(x/2)=x$$ $$\frac{df(g)}{dg}\frac{dg}{dx}=1$$ as you obtained initially.
I mean to say $$\frac{df}{dg}\frac{dg}{dx}=2$$ is not a counterexample to yourclaim as they are simply different