Basic second-order logic example contains a mistake?
Yes, the example contains a mistake. The statement $\forall X (\mathcal{R}(X,P)\rightarrow P(a))$ is in fact equivalent to $P(a)$, under the assumption that $\mathcal{R}(X,P)$ is true for at least one $X$.

So indeed, the example should be $\forall X (\mathcal{R}(X,P)\rightarrow X(a))$, as you state. Perhaps the author would not have made this mistake if they had chosen a class of people that would be described by another letter than $P$.