This problem follows the previous problem where I had to prove that there exist no $C^2$ retraction on a unit 2-ball to its boundary.
Here, the problem is actually asking to prove Brouwer's fixed point theorem for $C^2$ functions on the unit disk. What does it mean by the function r? does it sends all points between p and r(p) to r(p)?
Also, if I choose a random p in $D^2$, wouldn't that generate a different r and so how should I even establish that r exists? How can I even approach this problem before proving r is $C^2$, and that it indeed sends the boundary points to itself, etc? (Sorry I haven't done much proof-based math so I find this problem very hard to understand).
(And also I don't see where a quadratic formula could come from.)

$r$, as stated in the text, is a function from $D^2$ to $\mathbb{S}^1$, which maps the point $p$ to the point $r(p)$, with $r(p)$ constructed uniquely as the following:
Considering now the ray emanating from $f(p)$ to $p$. Its intersection with $\mathbb{S}^1$ is unique. That's our $r(p)$.
The pointwise computation of $r(p)$ in term of $f(p)$ (and $p$) is $2D$ euclidean geometry. Once you obtain the formula of $r$ in term of $f$, it should be possible to show that $r$ is $C^2$, assuming $f$ is $C^2$ (something like $f$ is $C^2$, hence $f^2$ is $C^2$, but with a function more complicated than the square).