You can also figure this out without using any use of unique factorization. Since you say this comes immediately after LCM, I assume you know that for $m\gt 0$, $[ma,mb]=m[a,b]$, where $[a,b]=\mathrm{lcm}(a,b)$ and $(ma,mb)=m(a,b)$ where $\gcd(a,b)=(a,b)$.
Now suppose $(a,b)=1$, and also assume they are positive, since if they are negative $[a,-b]=[a,b]$ anyway. Since $[a,b]$ is some multiple of $a$, let $[a,b]=ma$. Then $b\mid ma$, but $(a,b)=1$, so $b\mid m$. If this hasn't be addressed yet, notice $(ma,mb)=m(a,b)=m$, so $b\mid ma$, and $b\mid mb$, so $b\mid m$ since any common divisor of $ma$ and $mb$ divides the greatest common divisor $m$ in this case.
So $b\leq m$ as they are both positive, which implies $ba\leq ma$. But $ba$ is a common multiple of $a$ and $b$, so cannot be strictly less than $ma$, so $ba=ma=[a,b]$.
More generally, if $(a,b)=g\gt 1$, then you have $(\frac{a}{g},\frac{b}{g})=1$. Then by the special case above,
$$
\left[\frac{a}{g},\frac{b}{g}\right]\left(\frac{a}{g},\frac{b}{g}\right)=\frac{a}{g}\frac{b}{g}.
$$
Multiply through by $g^2$, you have
$$
\begin{align*}
g^2\left[\frac{a}{g},\frac{b}{g}\right]\left(\frac{a}{g},\frac{b}{g}\right) &= g\left[\frac{a}{g},\frac{b}{g}\right]g\left(\frac{a}{g},\frac{b}{g}\right)\\
&= [a,b](a,b)\\
&= g^2\frac{a}{g}\frac{b}{g}=ab
\end{align*}
$$
so $[a,b](a,b)=|ab|$.