The OP essentially asserts that divisors of coprimes remain coprime - which is the special case below where $\,(m,n) = 1,\,$ with the divisors $\,\bar m = m/d_1,\,\ \bar n = n/d_2,\, $ of $\,m,n$.
Lemma $\ \begin{align} \bar m &\mid m\\ \bar n &\mid n\end{align}$ $\Rightarrow\, (\bar m ,\bar n )\mid (m,n),\ \ $ where $\ (x,y) :=\gcd(x,y)$
Proof $\ \ \ \begin{align}&(\bar m ,\bar n )\mid \bar m \mid m\\ &(\bar m ,\bar n )\mid \bar n \,\mid n\end{align}\Rightarrow\, (\bar m ,\bar n )\mid (m,n)\ $ by the GCD Universal Property, i.e.
$$ c\mid a,b\iff c\mid (a,b)\qquad$$
Remark $ $ This universal property is the definition of GCD in more general rings where the Bezout identity need not hold true, e.g. in the polynomial UFD rings $\,\Bbb Z[x]\,$ and $\,\Bbb Q[x,y]\,$ where the gcds $\,(x,2) = 1 = (x,y)\,$ cannot be written as Bezout linear combinations. There the above proof still works, but Bezout-based proofs do not.
The theorem that you mention follows immediately from a more general fundamental property $$\ a\mid BC\:\Rightarrow a=bc,\ b\mid B,\ c\mid C$$ This goes by many names, e.g. Euler's four number theorem (Vierzahlensatz), Schreier refinement, Riesz interpolation, etc. For much further discussion of this and related factorization concepts see this answer.