Let $f(x)=x+2$ and $g(x)=x/3.$ Also denote the inverses to these functions as $f^{-1}$ and $g^{-1}.$ Compute \[f(g^{-1}(f^{-1}(f^{-1}(g(f(19)))))).\]
I notice that this expression involves a lot of compositions of functions and their inverses, so I wonder if there is a way to simplify it using some properties of inverses. One property I recall is that $f(f^{-1}(x))=x$ for any $x$ in the domain of $f^{-1}.$ This means that applying a function and its inverse in succession does nothing to the input. Another property is that $f^{-1}(f(x))=x$ for any $x$ in the domain of $f.$ This means that applying an inverse function and then the original function also does nothing to the input. Using these properties, I can start from the innermost parentheses and work my way out, canceling out any pairs of functions and their inverses that I encounter. For example, I see that $g(f(19))=g(21)=7,$ so I can rewrite the expression as \[f(g^{-1}(f^{-1}(f^{-1}(7)))).\] Next, I see that $f^{-1}(7)=5,$ so I can rewrite the expression as \[f(g^{-1}(f^{-1}(5))).\] Then, I see that $f^{-1}(5)=3,$ so I can rewrite the expression as \[f(g^{-1}(3)).\] Finally, I see that $g^{-1}(3)=9,$ so I can rewrite the expression as \[f(9).\] Now, I have a simple function evaluation, and I get \[f(9)=9+2=11.\] 