# This is tricky..Linear algebra again

First, you can show that $\ker A \oplus \mathrm{im}\, A = E$, which might be useful. (rank-nullity theorem)
Then, showing that $A$ and $A^2$ share the same rank is equivalent to proving that $\dim \ker A = \dim \ker A^2$ (rank-nullity theorem again) Here, we are in a special case : as $\ker A\subset \ker A^2$, (find a proof :D) you can try to show that $\ker A\supset \ker A^2$ which will give you $\ker A = \ker A^2$ and the equality of the dimensions.
For $\ker A\supset \ker A^2$, you might take $X\in E$ which can be decomposed as $X=X_k+X_i$ with $X_k\in\ker A$ and $X_I\in \mathrm{im}\,A$ (because $\ker A \oplus \mathrm{im}\, A = E$) and develop $A^2X=\ldots$