Thomas' Calculus 13th Edition

Yes, let $f(x)$ be a one-to-one function and we can find its inverse as $g(x)=f^{-1}(x)$. Using the properties of inverse functions, we have $f(g(x))=f(f^{-1}(x))=x$ and $g(f(x))=f^{-1}(f(x))=x$, thus $f(g(x))=g(f(x))$.