If $f$ is an isomorphism, then it is obvious. Assume that $f$ is not an
isomorphism, and hence we can express
$V_n$ as a direct sum of the generalised eigenspaces of $f$.
$$
V_n=W({\lambda_1})\oplus\cdots\oplus W({\lambda_k}),
$$
where $\lambda_1,\ldots,\lambda_k$ are the eigenvalues. As one of the is zero, set $\lambda_1=0$. Thus we can express $V_n$ as
$$
W(0)\oplus \hat{W},
$$
where $\hat{W}$ is the direct sum of the remaining generalised eigenspaces. Note that $f[W(0)]\subset W(0)$ and $f[\hat{W}]\subset\hat{W}$, $f$ is an isomorphism when restricted in $\hat{W}$ and $\,\mathrm{Ker}\,f\subset W(0)$.
Hence, it suffices to consider the case in which the only eigenvalue of $f$ is $0$. In such case $f$ can be represented, with respect to a suitable basis, in a diagonal block form
$$
A=\mathrm{diag}(J_0,J_1,\ldots,J_m),
$$
where $J_0=0\in\mathbb R^{n_0\times n_0}$ and
$$
J_s=\left(\begin{array}{ccccc}
0&1&0&0&\cdots&0&0 \\
0&0&1&0&\cdots&0&0 \\
0&0&0&1&\cdots&0&0 \\
\vdots&\vdots&\vdots&\vdots&&\vdots&\vdots \\
0&0&0&0&\cdots&0&1 \\
0&0&0&0&\cdots&0&0 \\
\end{array}\right)\in\mathbb R^{n_s\times n_s}
$$
It in not hard to show that:
$\mathrm{Ker}\,A\cap \mathrm{Im}\,A$
is spanned by exactly $m$ vectors. One for eauch block.
Also
$$
r(A)=(n_1-1)+(n_2-1)+\cdots+(n_m-1)
\quad\text{and}\quad
r(A)=(n_1-2)+(n_2-2)+\cdots+(n_m-2)
$$
Hence $r(A)-r(A^2)=m=\dim\,(\mathrm{Ker}\,A\cap \mathrm{Im}\,A)$.