Theorem: $$ f(f(x)) = f^{-1}(x) \implies f(x) = x, \ \ f : \Bbb R \to \Bbb R $$
Proof:
$f(x)$ is a real, continuous function that satisfies $f(f(x)) = f^{-1}(x)$.
That means that either $f : [x,f(x)] \to [f(x), f^{-1}(x)]$ or $f : [f(x),x] \to [ f^{-1}(x), f(x)]$. This is because the function is strictly monotonic, since it has an inverse.
This interval mapping shows us that $f(x) - x = f^{-1}(x) - f(x)$, which means $2f(x) -x = f^{-1}(x)$, yielding the equality:
$$f(f(x)) = 2f(x) -x$$
From that, we gather some info about the function itself:
$$f(x) = 2x - f^{-1}(x) $$
This leads to the fact of $f(f(x) -2x) = x$, with the consequence of:
$$f(f(f(f(f(x) -2x)))) = f(f(x) -2x) = x$$
This can only be true if $f(x) = x$.
EDIT:
The above proof has been edited a lot. In the first revision, I added a vital component I had forgotten. However, the revised proof was still incorrect, although the conclusion was correct. I have now reworked the proof quite drastically, and I believe it is correct.