Let be $V$ a vector space over $K$ and lets $a\in K\setminus\{0\}$ and $T:V \to V$ a linear map s. t. $a^2T-3aT^2+T^3=0$. Show that $V = Ker(T) \oplus Im(T)$.

My professor told me an observation:

This result is more general, that is, if I have a polynomial $P$ such with $P(0) = 0$ and $P'(0) \neq 0 $ such that $P(T) = 0 $ then $V = Ker(T) \oplus Im(T)$.

However, I didn’t find the relation with the exercise and his observation (of course, that polynomial assets the assumption but???). Can you give me a tip to solve this exercise??

Also I’ve tried to show that $T$ is a projection, but it didn’t work.