I'm a little bit confused by the notation being used in a proof of Kronecker's Theorem in Gallian, and I was wondering if you could help me understand what is going on.

Theorem: We want to show that given a field $F$ and $f(x)$ a nonconstant polynomial in $F[x]$ that there is an extension field $E$ of $F$ in which $F[x]$ has a zero.

Proof: So first we note that $F[x]$ is a UFD and thus we can find an irreducible factor $p(x)$ of $f(x)$. We then construct $E = F[x]/(p(x))$. This is a field containing a subfield isomorphic to $F$. Now we want to show that the coset in $E$, $x + I$, where $I = (p(x))$ is a zero of $p(x) \in E[x]$.

Where I get confused: So now Gallian says consider

$p(x) = a_nx^n+a_{n-1}x^{n-1}+...+a_0$

1) Am I correct in assuming that Gallian means $p(x) \in E[x]$? If that is the case, then this means that all the coefficients in the polynomial are elements in $E$ and are thus cosets of $I$ correct? So a coefficient like $a_n$ is an element that looks like $f_n(x) + I$ where $f_n(x) \in F[x]$ correct?

Then Gallian does the following

$$p(x+I) = a_n(x+I)^n+...+a_0$$ $$p(x+I) = a_n(x^n+I)+...+a_0$$ $$p(x+I) = a_nx^n + ... + a_0 + I = p(x) + I = 0$$

I understand how we get from the first line to the second line, we are merely multiplying the coset $(x+I)$ by itself the specified number of times, and we multiply cosets by multiplying their representatives. What I'm not completely comfortable with is when we go from line 2 to 3, where we are multiplying the representative of a coset by a coset and then adding representatives to get the $I$ by itself at the end of the sum. I might also be getting confused here because we are sometimes using $x$ as a coset representative and other times as a placeholder in the polynomial.

I tried doing the following tedious expansion to justify it to myself, but I seem to be getting stuck at the end.

We let $p(y) \in E[y]$ be defined as (I'm using y as the new placeholder to avoid confusing myself), where $E = \{f + I \mid f \in F[x]\}$ and $a_i = f_i + I$

$$p(y) = a_ny^n+...+a_0$$ $$p(x+I) = (f_n + I)(x+I)^n+...+(f_0 + I)$$ $$p(x+I) = (f_nx^n+I)+...+(f_0+I)$$ $$p(x+I) = (f_nx^n+...+f_0)+I$$

But I guess not I'm just having a hard time seeing how to get the last line to say that $p(x+I) = p(x) + I$

I'm sorry if this seems really obvious to everyone but for some reason even though the derivations look obvious I can't seem to justify them and having them understood would really give me peace of mind.

I think I just discovered my answer. Since we started with the polynomial $p(x) \in F[x]$, when we take it over to $E[y]$, the coefficients are still coefficients from the isomorphic copy of $F$, not just any old coefficients in $E$, so that's why the distribution and everything worked out, because $a_i$ was just shorthand for $a_i + I$.