Is this true? $f(g(x))=g(f(x))\iff f^{-1}(g^{-1}(x))=g^{-1}(f^{-1}(x))$. 
Is this true?
Given $f,g\colon\mathbb R\to\mathbb R$. $f(g(x))=g(f(x))\iff f^{-1}(g^{-1}(x))=g^{-1}(f^{-1}(x))$.

I met this problem when dealing with a coding method, but I'm really not familiar with functions. Please help.
Thank you.

As others have said, $f$ and $g$ must be invertible. Now recall the following identity:

For any invertible functions $f,g$, it follows that $(f \circ g)^{-1} = g^{-1} \circ f^{-1}$.

Hence, observe that:
$$ \begin{align*}
f \circ g=g \circ f
&\iff (f \circ g)^{-1}=(g \circ f)^{-1} \\
&\iff g^{-1} \circ f^{-1}=f^{-1}\circ g^{-1} \\
&\iff f^{-1}\circ g^{-1} = g^{-1} \circ f^{-1} \\
\end{align*} $$
as desired.
