$\mathbb{B}^n$ has the fixed point property $\implies \mathbb{S}^{n-1}$ is not a retract of $\mathbb{B}^n$ I'm struggling to understand the proof of this theorem.

Theorem: $\mathbb{B}^n$ has the fixed point property $\implies \mathbb{S}^{n-1}$ is not a retract of $\mathbb{B}^n$
Proof: Let's suppose there exists a rectraction $r:\mathbb{B}^n \rightarrow\mathbb{S}^{n-1}$. Then the function $f:\mathbb{B}^n \rightarrow\mathbb{B}^{n-1}$ given by $f(x)=-r(x)$ is a continuous function. $\mathbb{B}^n$ has the fixed point property, so there exists $x_0 \in \mathbb{B}^2$ such that $f(x_0)=x_0$. But $r(x_0) \in \mathbb{S}^{n-1}$, so $x_0 = -r(x_0) \in \mathbb{S}^{n-1}$. $r$ is a rectraction, so $r(x_0)=x_0=-r(x_0)$, which is a cotradiction, because  $r(x_0)\in  \mathbb{S}^{n-1}$

I don't understand how $f(x_0)=x_0$, because $x_0 \in  \mathbb{B}^{2}$ and  $f(x_0) \in \mathbb{B}^{1}= \{x: x\in [-1,1]\}$, so to me the equality would only make sense if the fixed point of  $\mathbb{B}^{2}$ happened to be in the set $\{(x,y) \in \mathbb{B}^{2}: y=0\}$.
 A: I think this proof has a couple of mistakes.
First of all, you'd want $f:\Bbb B^n\to \Bbb B^n$. Because $\Bbb S^{n-1}\subseteq \Bbb B^n$, not $\Bbb B^{n-1}$. Also, how would the fixed point property ever enter into this if $f$ didn't have the same domain as codomain?
Second, why $\Bbb B^2$ all of a sudden?
Here is the proof with those two errors corrected:

Proof: Let's suppose there exists a rectraction $r:\mathbb{B}^n \rightarrow\mathbb{S}^{n-1}$. Then the function $f:\mathbb{B}^n \rightarrow\mathbb{B}^{n}$ given by $f(x)=-r(x)$ is a continuous function. $\mathbb{B}^n$ has the fixed point property, so there exists $x_0 \in \mathbb{B}^n$ such that $f(x_0)=x_0$. But $r(x_0) \in \mathbb{S}^{n-1}$, so $x_0 = -r(x_0) \in \mathbb{S}^{n-1}$. $r$ is a rectraction, so $r(x_0)=x_0=-r(x_0)$, which is a cotradiction, because  $r(x_0)\in  \mathbb{S}^{n-1}$

Now, as for your question (maybe the corrections have made it clearer already): $f$ is a continuous function from $\Bbb B^n$ to $\Bbb B^n$, and $\Bbb B^n$ has the fixed-point property. "The fixed-point-property" means that any continuous function from that space to itself has a fixed point. A fixed point is a point $x_0$ such that $f(x_0) = x_0$.
