By Euclid's Lemma: $\rm\, \gcd(\color{#C00}{a,b})\! =\! 1,\,$ $\rm\ \overbrace{\color{#c00}{a\mid b}\,(x/b)}^{\!\!\large {\rm by}\,\ a,b\,\mid\, x}\ \Rightarrow\ a\mid x/b\, \overset{\!\!\times\, b}\Longrightarrow\ ab\mid x$
Or $\rm\, \ b,a\:|\:x\ \Rightarrow\ ab\: |\: ax,bx\ \Rightarrow\ ab\ |\ gcd(ax,bx) = x\gcd(\color{#c00}{a,b}) = x\, $ by gcd Distributive Law.
This is the special case $\rm\ gcd(a,b) = 1\ $ of $\rm\ gcd(a,b)\ lcm(a,b)\ =\ ab\ $ which has a similar proof that has an elegant view in terms of cofactor reflection.
See also the LCM Universal Property $\ a,b\mid x\iff {\rm lcm}(a,b)\mid x$
By induction this generalizes to lcm = product for pair coprimes (see also here), i.e.
$$ a_1,\cdots a_k\mid x\,\Rightarrow\, a_1\cdots a_k \mid x\, \ \ {\bf if}\,\ \,a_i\, \text{ are pair-coprime}\qquad$$