Show that $\left( g\circ h\right) ^{-1}=h^{-1}\circ g^{-1}$ 
Given that $f\left( x\right) =\dfrac {\log \left( x\right) }{1-\log \left( x\right) }$, $ g\left( x\right) =\dfrac {x}{1-x}$, $h\left( x\right) =\log \left( x\right) $ show:
$f=g\circ h$ and that $\left( g\circ h\right) ^{-1}=h^{-1}\circ g^{-1}$


Showing that $f=g\circ h$:
$ g\left( x\right) =\dfrac {x}{1-x}$, substituting $h\left( x\right) =\log \left( x\right) $ gives $g\left( log\left( x\right) \right) =\dfrac {\log \left( x\right) }{1-\log \left( x\right) }=g\circ h$ therefore $f=g\circ h$

Showing that $\left( g\circ h\right) ^{-1}=h^{-1}\circ g^{-1}$:
$f^{-1}\left( x\right) =10^{\left( \dfrac {x}{x+1}\right) }$
$g^{-1}\left( x\right) =\dfrac {x}{x+1}$
$h^{-1}\left( x\right) =10^{x}$
As $\left( g\circ h\right) ^{-1}=f^{-1}$,  $f^{-1}=h^{-1}\circ g^{-1}$.
Given that $f^{-1}\left( x\right) =10^{\left( \dfrac {x}{x+1}\right) }$, $\left( h^{-1}\circ g^{-1}\right) \left( x\right) =10^{\left( \dfrac {x}{x+1}\right) }$, showing this:
$h^{-1}\left( x\right) =10^{x}$, substituting $g^{-1}\left( x\right) =\dfrac {x}{x+1}$ gives $\left( h^{-1}\circ g^{-1}\right) \left( x\right) =10^{\left( \dfrac {x}{x+1}\right) }$

I'm sorry if that looks convoluted, I've demonstrated that I can do as the question has asked but these are my actual questions:
$\left( g\circ h\right) ^{-1}=h^{-1}\circ g^{-1}$, why in general is this true? Why do the h and g swap places in the last equality? (That's really what's tripping me up). Shouldn't it be: $\left( f\right) ^{-1}=\left( g\circ h\right) ^{-1}=g^{-1}\circ h^{-1}$. What is the intuition behind this? Furthermore how can an inverse be applied to both sides?
I'd be forever grateful if someone could explain all this, bearing in mind I'm studying at a pre-calculus level , I hope I've made sense. Thank you!
 A: The equality $\left( g\circ h\right) ^{-1}=h^{-1}\circ g^{-1}$ is always true: To see this calculate
$$(g\circ h)\circ h^{-1}\circ g^{-1}$$
A: What gets done last gets undone first.
For example, here a way of looking at $x\mapsto y=3x+2$:
$$
x \quad \mapsto \quad 3x \quad \mapsto \quad 3x+2 = y.
$$
In other words, first multiply by $3$, then add $2$.
To invert this function, first subtract $2$, then divide by $3$:
$$
y \quad \mapsto \quad y-2 \quad \mapsto \quad \frac{y-2}{3}=x.
$$
You can write $h(x)=3x$ and $g(x)=x+2$, so the first function above is $g(h(x))$.
Then the inverse is $h^{-1}(g^{-1}(x))$.
To say that $(g\circ h)^{-1}= h^{-1}\circ g^{-1}$ is another way of saying that what gets done last gets undone first.
A: Think of a function as an action over a variable that changes it. For example consider $f(x)=x^2$. You act on x by squaring it. Equivalently the inverse of  a function is an action that cancels such function. In this case the  square root is the inverse.
Now think about the actions without thinking about the object of such actions. Then it becomes clear that f○f^-1 is equal to doing nothing. Equivalently  (g○h)○(h^-1○g^-1) cancels out because the h's cancel and then the g's. The reason why the inverse changes the order is because in composition order does matter and (g○h)○(g^-1○h^-1) wouldn't cancel out because inverses aren't next to each other.
For another example take a Rubik cube. Assume that a face move corresponds to g and another face move corresponds to h. You'll notice that if you move these two faces and if you want to return the cube to its original state you'll want to move the same faces but in reverse order to the one you applied.
