Let $R$ be an integral domain and let $I,J \subseteq R$ be ideals. Suppose $IJ=(a)$ for some $a \in R$. We wish to show that $I$ and $J$ are finitely generated.
Since $a \in IJ$ we know $a$ can be written as the finite sum of products of the form $xy$, where $x \in I$ and $y \in J$. I want to show that $I$ is generated by these particular $x$'s (and analogously $J$ is generated by these particular $y$'s). But I'm having some trouble & I'm ready for a bigger hint.
By hypothesis, there exist elements $r_i\in I, s_i\in J,\enspace i=1,\dots, n$ such that $\displaystyle a=\sum_{i=1}^n r_is_i$.
Now for any $x\in I$, one has $\;\displaystyle x=\sum_{i=1}^n r_i\frac{s_i}a x$. Observe that, since $s_ix\in IJ=(a)$, $\dfrac{s_ix}a\in R$, so that $x\in (r_1,\dots, r_n)$.
By symmetry, the same is true for $J$.
Incidentally, it also proves $I$ and $J$ are projective ideals (Bourbaki, Algebra, Ch. II Linear Algebra, §2, n°6, prop. 12).