I am trying to show that
*"Let $A$ be a normal operator and $P$ be a positive operator such that $AP^2=P^2A$.
Then $AP=PA$."
A hint is given as the following.
We should prove that
If $x \in \ker(P)$ then $(AP−PA)x=0$.
If $x \in range(P)$ then $(AP−PA)x=0$.
Therefore, $AP−PA=0$.
I tried to give in detail but it still gets in struck.
Thank you for your help.