Let $\sigma:R\to S$ be a ring homomorphism, and $\sigma^{*}$ be the induced map $\sigma^{*}:R\left[x\right]\to S\left[x\right]$ given by $\sum a_{i}x^{i}\mapsto\sum\sigma\left(a_{i}\right)x^{i}$ (this is also a homomorphism). If R and S are integral domains, prove that if $\sigma^{*}\left(p\left(x\right)\right)$ is irreducible in $S\left[x\right]$ and $\deg p\left(x\right)=\deg\sigma^{*}\left(p\left(x\right)\right)$, then $p\left(x\right)$ is irreducible in $R\left[x\right]$.
This is what i got so far. Proof by contradiction.
Suppose that $p(x)$ is reducible in $R[x]$. Then there exist $f(x), g(x) \in R[x]$ such that $$p(x)=f(x)g(x).$$ Applying $\sigma^*$ on $p(x)$ we have $$\sigma^*(p(x))=\sigma^*(f(x))\sigma^*(g(x))$$ which is contradiction since $\sigma^*$ is irreducible in $S[x]$.
I know that this proof isn't enough since I didn't use $R$ and $S$ being an integral domain (which implies that $R[x]$ and $S[x]$ are also integral domain)and the degrees of $p(x)$ and $\sigma^*(p(x))$. Any help will be much appreciated.
Consider $R[x]$, where $R$ is an integral domain. Let
$f(x), g(x) \in R[x]; \tag 1$
writing
$f(x) = \displaystyle \sum_0^{\deg f} f_i x^i, \tag 2$
and
$g(x) = \displaystyle \sum_0^{\deg g} g_i x^i; \tag 3$
then the leading term of $f(x)g(x)$ is the product of the leading terms of $f(x)$ and $g(x)$, since
$f(x)g(x) = \displaystyle \sum_{i = 0}^{\deg f + \deg g} \sum_{j = 0}^i f_j g_{i - j} x^i = f_{\deg f}g_{\deg g} x^{\deg f + \deg g} + \sum_{i = 0}^{\deg f + \deg g - 1} \sum_{j = 0}^i f_j g_{i - j} x^i ; \tag 4$
now the fact that $R$ is an integral domain implies that
$f_{\deg f}g_{\deg g} x^{\deg f + \deg g} \ne 0, \tag 5$
for
$f_{\deg f} \ne 0 \ne g_{\deg g} \Longrightarrow f_{\deg f}g_{\deg g} \ne 0; \tag 6$
in the light of this, we see that
$f(x) \ne 0 \ne g(x) \Longrightarrow f(x)g(x) \ne 0, \tag 7$
and we thus see that not only is $R[x]$ an integral domain, but also that
$\deg f(x)g(x) = \deg f(x) + \deg g(x). \tag 8$
Now if $S$ is also an integral domain, and we are given the homomorphism
$\sigma:R \to S, \tag 9$
we have the induced homomorphsim
$\sigma^\ast:R[x] \to S[x] \tag{10}$
defined by
$\sigma^\ast \left (\displaystyle \sum_0^{\deg f} f_i x^i \right ) = \displaystyle \sum_0^{\deg f} \sigma(f_i) x^i; \tag{11}$
we let
$p(x) \in R[x] \tag{12}$
be such that
$\sigma^\ast(p(x)) \in S[x] \tag{13}$
is irreducible, but that
$p(x) = f(x)g(x) \tag{14}$
is reducible in $R[x]$, with $f(x), g(x) \in R[x]$ non-constant factors; then in $S[x]$,
$\sigma^\ast(p(x)) = \sigma^\ast(f(x)) \sigma^\ast(g(x)); \tag{15}$
it then follows from our hypothesis
$\deg \sigma^\ast(p(x)) = \deg p(x), \tag{16}$
together with (8) that
$\deg \sigma^\ast(f(x)) + \deg \sigma^\ast(g(x)) = \deg \sigma^\ast(p(x)) = \deg p(x) = \deg f(x) + \deg g(x), \tag{17}$
and since
$\deg \sigma^\ast(f(x)) \le \deg f(x), \; \deg \sigma^\ast(g(x)) \le \deg g(x)), \tag{18}$
we infer
$1 \le \deg f(x) = \deg \sigma^\ast(f(x)), \; 1 \le \deg g(x) = \deg \sigma^\ast(g(x)), \tag{19}$
which implies that neither $\sigma^\ast(f(x))$ nor $\sigma^\ast(g(x))$ are constant polynomials, and thus that $\sigma^\ast(p(x))$ is reducible in $S[x]$, contrary to assumption; therefore we conclude that $p(x) \in R[x]$ is irreducible.