I'm trying to understand the last step in a proof from Dummit and Foote on page 513. The theorem states that if $p(x)$ is irreducible in $F[x]$ (where $F$ is a field), then there exists a field $K$ containing an isomorphic copy of $F$ in which $p(x)$ has a root.
The general argument makes sense. I'm getting hung up on the last part though. If we restrict the canonical projection $\pi:F[x]\rightarrow F[x]/(p(x))$ to $F$, it follows that $K$ contains an isomorphic copy of $F$ (I'm skipping the details here). Let $\overline{x}=\pi(x)$ denote the image of $x$ in the quotient $K$.
The next line states $p(\overline{x})=\overline{p(x)}$ because $\pi$ is a homomorphism. Why does this follow?
The first line on page 513 says that: we identify $F$ with its isomorphic image in $K$. This means that since $\pi:F\to \pi(F)$ is a ring isomorphism, we treat $a\in F$ and $\pi(a)=\overline{a}$ as the same element. So if $p(x)=a_{0}+a_{1}x+\cdots+a_{n}x^{n}$, then $$ \begin{split} \overline{p(x)}&=\pi(p(x))=\pi(a_{0}+a_{1}x+\cdots+a_{n}x^{n})\\ &=\pi(a_{0})+\pi(a_{1})\pi(x)+\cdots+\pi(a_{n})(\pi(x))^{n} \quad \textrm{since $\pi$ is a ring homomorphism}\\ &=a_{0}+a_{1}\overline{x}+\cdots+a_{n}(\overline{x})^{n} \quad \textrm{since we identify $a$ with $\pi(a)$}\\ &=p(\overline{x}). \end{split} $$