The generalized $\lambda-\text{eigenspace}$ is defined by: $V^f_{(\lambda)}=\bigl\lbrace v\in V\mid\exists j\,\text{ such that }\,(f-\lambda)^jv=0 \bigr\rbrace$. Suppose that $V$ is a vector space over the field $k$ and $f,g\in \operatorname{End}_k(V)$ satisfy $f\circ g=g\circ f$. Show that $g(V^f_{(\lambda)})\subseteq V^f_{(\lambda)}$.
Own work: Well I tried choosing an element of $v\in V^f_{(\lambda)}$ and I have to see if $(f-\lambda)^j(g(v))=0$. But I don't know how to link the commutativity of f and g with the application of $(f-\lambda)^j(g(v)$.
Hint: Show by induction that $f^n\circ g = g\circ f^n$; then conclude that $g$ commutes with all elements of $k[f]$.