$\renewcommand{\Im}{\text{Im}}$Let $V$ be a finite-dimensional vector space over $\mathbb{C}$ and $T:V \to V$ a linear transformation with $\dim(\Im(T))=\dim(\Im(T^2))$. First prove that $\dim(\ker(T))=\dim(\ker(T^2))$ and then prove that $\ker(T)=\ker(T^2)$.
I'm having some trouble proving this. I figured I could maybe define a new linear transformation $S: T(V) \to V$ and then apply the rank-nullity theorem but I am not able to figure it out..