Composition of 2 involutions

I assume that by "bijection" on a set $S$ you mean a bijection from $S$ to itself. The question would not make sense for a bijection from $S$ to some other set.

The bijection decomposes $S$ into orbits. It suffices to prove for a single orbit.

An orbit under the bijection is either a finite cycle $p_0 \to p_1 \to p_2\to \cdots \to p_n = p_0$ or a two-sided infinite sequence $\cdots \to p_{-2} \to p_{-1} \to p_0 \to p_{1} \to p_2 \to \cdots$.

In the infinite case, you can take the involutions $p_i \to p_{-i}$ and $p_i \to p_{1-i}$. In the finite case, $p_i \to p_{-i \pmod n}$ and $p_i \to p_{1-i \pmod n}$.