In the ring $R=\mathbb Z[X],$ is $(X)+(X^2)=(X)$?
It is known that if $R$ is a UFD, then $R[X]$ is a UFD. Is the converse true?
For $\rm(2)$ the key observation is that $\rm R$ is inertly embedded in $\rm R[X],$ i.e. factorizations in $\rm R[X]$ of $\rm r\in R^*$ already lie in $\rm R,$ i.e $\rm\: 0\ne r = fg,\ f,g\in R[X]\:$ $\rm\Rightarrow$ $\rm\:f,g\in R,\:$ by comparing degrees (and employing $\rm R$ is a domain). This implies the factorization theory of $\rm R[X]$ restricts faithfully to $\rm R$.
Thus, since $\rm R[X]$ is a UFD, any nonunit $\rm\:r\in R^*\:$ is a product of atoms in $\rm R[X],$ hence in $\rm R,$ by inertness. Further, such atoms $\rm\:p\:$ are prime in $\rm R[X]$ so also in $\rm R$ since $\rm p\ |\ a,b\:$ $\rm\Rightarrow$ $\rm\:p\ |\ a\:$ or $\rm\:p\ |\ b\:$ in $\rm R[X]$ so in $\rm R$, i.e. $\rm\:p\ |\ a\:$ in $\rm\:R[x]\:$ $\Rightarrow$ $\rm\:a = p\:\!f,\ f\in R[X]\:$ $\rm\Rightarrow$ $\rm\:f\in R\:$ $\Rightarrow$ $\rm\:p\ |\ a\:$ in $\rm R,\:$ by inertness. Hence $\rm R$ is a UFD, since prime factorizations of $\rm\:r\in R[X]\:$ pull back to prime factorizations in $\rm R.$
Similarly one can show that any inertly embedded subdomain of a GCD domain is also a GCD domain, and gcds remain the same in the subdomain. In a classic paper, Paul Cohn showed that any GCD domain can be inertly embedded in a Bezout domain, i.e. a domain $\rm D$ where gcds are linearly representable $\rm\gcd(a,b) = ac + bd,\ c,d\in D,\:$ see Cohn: Bezout rings and their subrings.