Let $R$ be a UFD, and let $a$ and $b$ be nonzero elements of $R$. In a UFD all elements (other than $0$ and the units) determine a unique multiset (a set of elements "with multiplicity") of irreducible factors. We can also agree that units have no factors; that is, the corresponding multiset is $\varnothing$.
I'm in the process of proving that
$(a) \subseteq (b) \Leftrightarrow $ the multiset of irreducible factors of $b$ is contained in the multiset of irreducible factors of $a$
$(a) = (b) \Leftrightarrow$ the two multisets coincide
It's pretty straightforward if $a$ or $b$ is a unit (if $a$ is a unit, $(a) = R \subseteq (b)$, then so is $b$, and $\varnothing = \varnothing$, if $b$ is a unit, $\varnothing$ is contained in any multiset). $(a) \subseteq (b) \Leftrightarrow a \in (b) \Leftrightarrow \exists c \in R: \ a = bc$
It's easy if $c$ is not a unit, so it has a factorization into irreducibles.
Let $q_1...q_n, q'_1...q'_m, q''_1...q''_r$ be the respective factorizations of $a, b, c$. And so on.
But what if $c$ is a unit? It cannot be factorized into irreducibles. So we have
$q_1...q_n = cq'_1...q'_m$
What does it really tells us about relations between $\{q_1, ..., q_n \}$ and $\{q'_1, ..., q'_m \}$?
If $c$ is a unit and $a=bc,$ then $b=a(c^{-1})$. So $b\in (a),$ which means $(b)\subseteq (a).$ Therfor $(b)=(a).$ Now use uniqueness of multiset in a UFD.