I propose the following: suppose $\,U\,$ is not prime, thus there exist $$\,x,y\in R \text{ such that }x,y\notin U\,,\,xy\in U\,.$$ Define now $B:=U+\langle y\rangle$.
By maximality of $\,U\,$ we have that $\,B\,$ is f.g., say $$\,B=\Bigl\langle u_i+r_iy\,,\,1\leq i\leq k\,,\,k\in\mathbb{N}\,\,;\,\,u_i\in U\,,\,r_i\in R\Bigr\rangle$$ and let now $$U_y:=\{s\in R\,\,;\,\,sy\in U\}.$$ (1) Check that $\,U_y\,$ is a proper ideal in $\,R\,$.
(2) Show that $\,U_y\,$ is f.g.
Put $\,U_y=\langle s_1,\ldots,s_m\rangle\,$, and take $\,u\in U\Longrightarrow\,\exists v_1,\ldots,v_k, t_1,\ldots,t_k\in R\,\,s.t.$$$u=\sum_{n=1}^kv_nu_n+\sum_{n=1}^kt_nr_ny.$$
(3) Show that $\displaystyle{\sum_{n=1}^kt_nr_n}\in U_y.$
(4) Putting $\,\Omega:=\{u_i,\ldots,u_k,ys_1,\ldots,ys_m\}\,$, derive the contradiction $\,U=\langle\Omega\rangle$.
Yea, if $R$ is an integral domain and $\varphi : R \cong R'$ then $R'$ is an integral domain.
For any two $r,s \in R$ such that $r\neq 0 $ and $s \neq 0$ we have that $\varphi$ is an $\cong$ implies that $\varphi(r)\neq 0 $ and $\varphi(s) \neq 0$; furthermore since $R$ is an integral domain we have that $rs \neq 0 $ and therefore $\varphi(rs) \neq 0$ but then $\varphi(r) \varphi(s) \neq 0$ as well (since $\varphi$ is a morphism).
Since $\varphi$ is unto then this must hold in the opposite direction so that for any $r',s' \in R' $ such that $r'\neq 0 $ and $s ' \neq 0$ there is two $\varphi^{-1}(r'),\varphi^{-1}(s') \in R$ such that $\varphi^{-1}(r')\neq 0 $ and $\varphi^{-1}(s') \neq 0$ and therefore we have that $r' s' \neq 0$ as was needed.
Setting $R' = R[x]/(x)$ you get the last piece of your proof.
Best Answer
Since $A$ is an ideal of $A$, the requirement that a map $f : A \to B$ sends ideals to ideals implies that $f(A)$ is an ideal of $B$.
However, $f(A)$ is an ideal of $B$ containing $1_B$, and thus $f(A) = B$. So $f$ is surjective, as required.
The theorem is no longer true if we merely require $f$ to map proper ideals to ideals. For example if $A$ is a field, then its only proper ideal is the zero ideal, and thus every ring homomorphism $f : A \to B$ has the property that it sends proper ideals to ideals.