The picture is a part of the proof of the cyclotomic polynomial $\Phi_n$ is irreducible over $\Bbb Q$.
My question is: why it is said (in the bottom line) that it suffices to assume $p$ is a prime.
It comes from the fact that:
Every number $p$ which is coprime to $n$ can be factorized as a product of prime numbers, each coprime to $n$. And if you want to raise $\zeta$ to $p$ th power, you can firstly raise to some prime factor power of it and then raise to another prime power...
I do not quite understand why we can firstly raise it to some prime-factor power and than raise to another power... I think maybe it is saying $f(\zeta^p)=f(\zeta^{p_1\cdot p_2})=(f(\zeta^{p_1}))^{p_2}$, which is not true because $f$ is a polynomial, not a homomorphism.
Am I misunderstand the things I quote? Could someone polease explain it explicitly? Thanks so much!

If $\zeta$ is a primitive $n^{th}$ root of $1$, then so is $\zeta^{i}$ for any $i$ relatively prime to $n$. Starting from a prime $p$ relatively prime to $n$, you can build up any $i$ inductively starting with $p$ and after each stage replace $\zeta^p$ with say $\zeta^{'}$ and repeating, so ${\zeta^{'}}^p = \zeta^{p^2}$, etc.