I want to prove that the number of fixed points of a non-identity automorphism on a compact Riemann surface $X$ is at most 2g+2.
Following hints given, I have considered the divisor $D = (g+1)P$, where $P \in X$ and $F(P) \neq P$, where $F$ is an automorphism. Then by Riemann-Roch: \begin{align*} \mbox{dim}L((g+1)P) \geq g+1 + 1-g = 2 \end{align*} So there exist meromorphic functions $f \in L((g+1)P)$ with poles of order at most $(g+1)$ at $P$. In the next part, I am given the hint to consider the function $h = f - f \circ F$.
I don't know how to continue the proof though. Can someone please give me a push?