Claim: $f(X)^{p^m}=f(X^{p^m})$, if $f(X)\in \Bbb Z_p[X]$ and $m\in \Bbb N$.
Proof 1. Recall that since $R:=\Bbb Z_p[X]$ is a commutative ring of prime characteristic $\mathrm{Char}(R)=p$, then we have $$(f(X)+g(X))^p = f(X)^p + g(X)^p, $$ for all elements $f(X),g(X)\in R$. Moreover, the map $$\varphi_p:R\longrightarrow R,\ f(x) \longmapsto \varphi_p(f(X)):= f(X)^p$$ is a ring homomorphism (the so-called Frobenius homomorphism) that fixes $\Bbb Z_p$.
Then, $\forall m\in \Bbb N$, the map $$\varphi_p^m:R\longrightarrow R,\ f(X)\longmapsto \varphi_p^m(f(X)):= f(X)^{p^m}$$ is also a ring homomorphism, as it is a composition of ring homomorphisms, that fixes $\Bbb Z_p$.
Say $f(X):=a_nX^n+a_{n-1}X^{n-1}+\dotsb+a_0\in \Bbb Z_p[X]$. Then, \begin{alignat}{2} \varphi_p^m(a_nX^n+a_{n-1}X^{n-1}+\dotsb+a_0) \quad & = \quad \varphi_p^m(a_n)\varphi_p^m(X^n)+\varphi_p^m(a_{n-1})\varphi_p^m(X^{n-1})+\dotsb+\varphi_p^m(a_0) \\ & = \quad a_n^{p^m}(X^n)^{p^m}+a_{n-1}^{p^m}(X^{n-1})^{p^m}+\dotsb+a_0^{p^m} \\ & = \quad a_n (X^n)^{p^m}+a_{n-1} (X^{n-1})^{p^m}+\dotsb+a_0 \\ & = \quad a_n(X^{p^m})^n+ a_{n-1}(X^{p^m})^{n-1}+\dotsb+a_0 \\ & = \quad f(X^{p^m}) \\ \end{alignat} and $\varphi_p^m(a_nX^n+a_{n-1}X^{n-1}+\dotsb+a_0)=\varphi_p^m(f(X))=f(X)^{p^m}$. This completes the proof.
Proof 2. Since $R:=\Bbb Z_p[X]$ is a commutative ring of prime characteristic $\mathrm{Char}(R)=p$, we have $$(x+y)^{p^m}=x^{p^m}+y^{p^m},\quad \forall x,y\in R,\ m\in \Bbb N.$$ So, \begin{alignat}{2} f(X)^{p^m} \quad & = \quad (a_nX^n+\dotsb+a_0 )^{p^m} \\ \quad & = \quad (a_nX^n+(a_{n-1}X^{n-1}\dotsb+a_0))^{p^m} \\ \quad & = \quad (a_nX^n)^{p^m}+ (a_{n-1}X^{n-1}\dotsb+a_0)^{p^m} \\ \quad & = \quad (a_nX^n)^{p^m}+ ((a_{n-1}X^{n-1})+(a_{n-2}X^{n-2}+\dotsb+a_0))^{p^m} \\ \quad & = \quad (a_nX^n)^{p^m}+ (a_{n-1}X^{n-1})^{p^m}+(a_{n-2}X^{n-2}+\dotsb+a_0)^{p^m} \\ \quad & = \quad \dotsb \\ \quad & = \quad (a_nX^n)^{p^m}+ (a_{n-1}X^{n-1})^{p^m}+\dotsb+a_0^{p^m} \\ \quad & = \quad (a_nX^n)^{p^m}+ (a_{n-1}X^{n-1})^{p^m}+\dotsb+a_0^{p^m} \\ \quad & = \quad a_n^{p^m}(X^{p^m})^n+ a_{n-1}^{p^m}(X^{p^m})^{n-1}+\dotsb+a_0^{p^m} \\ \quad & = \quad a_n^{p^m}(X^{p^m})^n+ a_{n-1}^{p^m}(X^{p^m})^{n-1}+\dotsb+a_0^{p^m} \\ \quad & = \quad a_n(X^{p^m})^n+ a_{n-1}(X^{p^m})^{n-1}+\dotsb+a_0 \\ \quad & = \quad f(X^{p^m}) \\ \end{alignat}
Questions. Are both proofs correct? Any other possible proofs?