Notice that $f^{-1}(f(x)) = x$. So if f coincides with its inverse then $f(f(x)) = x$. Calculate f(f(x)) and see where that leads you.