Let $a$ be an element of $\mathbb{F}_p$, which is not a quadratic residue.
Define $$f(x) = \frac{x - a}{x+1},$$$$f(x) = \frac{x + a}{x+1},$$ which is a rational function on $\mathbb{F}_p$. In fact, if we set $f(-1)=\infty$ and $f(\infty)=1$, then $f:\mathbb{F}_p\cup\{\infty\}\rightarrow \mathbb{F}_p\cup\{\infty\}$ is a bijection.
What is the order of $f$ under the operation of composition?
I expect that $f$ has order $p+1$, but I don't know how to prove it.
EDITEdit:
After checking the computations that lead me to this question As pointed out rightfully below, I can say with confidence that I meanthe sign of $-a$$a$ was wrong at first!