$$f(a) = a^2 - x^2 = a^2\left(1 - \left( \frac x a \right)^2 \right)$$
Now $x/a$ can be anything, so we've got the $1 - $ an arbitrary quadratic residue. The problem becomes counting how many quadratic residues there are in the image of $f(x) = 1 - x^2$ (I found it distracting to make the constant in the function $x$).
So let's say we've got $$1 - x^2 = y^2 \iff 1 = x^2 + y^2$$ This looks like a circle. So we have to count the number of points on the unit circle, and then get rid of repeated values of $x$.
Maybe we can do that considering lines from $(-1,0)$ to the circle. Every point on the circle has such a line, and so we just have to show that for any slope we get two points only one of which is $(-1,0)$ (therefore making it one-to-one). The non-$(-1,0)$ solution to this is well known: $$(\frac{2t}{1 + t^2}, \frac{1-t^2} {1+t^2})$$ where $t$ is the slope of the line. So we have that every point yields a unique line and every line yields a point, so one-to-one as claimed.
Now divide the number of points on the circle (which is $p+1$, when counting every slope value and the vertical line) by $2$ and then add $1$ to get $\frac{p+1}{2} + 1 = \frac{p + 3} 2$