Solution 1:

Rewriting your proof:

Let $|f(x) - L| < \epsilon_1$ for $|x-a| < \delta_1$

Let $|g(x) - M| < \epsilon_2$ for $|x-a| < \delta_2$

\begin{align}|f(x)g(x)-LM|&=|f(x)g(x)-Lg(x)+Lg(x)-LM|\\ &=|g(x)(f(x)-L)+L(g(x)-M)|\\ &\le|g(x)||f(x)-L|+|L||g(x)-M| \\ &\lt|M|\epsilon_1+|L|\epsilon_2 \end{align}

Since $\epsilon_1$ and $\epsilon_2$ are arbitrarily small, the proof can end here I suppose.

Solution 2:

Your proof is almost identical to the proof my calculus professor showed us in class, but I think there's one little thing you can fix to make it more rigorous. In your proof you wrote, $$|g(x)| = |g(x) - M + M| \leq |g(x) - M| + |M| \leq |M|+1$$

The last inequality isn't quite trivial, so it would be better if you write something along the lines of

$$\text{Let}\; \frac{\epsilon}{2(|L|+1)} = 1,\;\text{then}\; \exists{\delta' \gt 0} \;\text{such that}\; |x-a|\lt \delta'\; \text{implies}\; |g(x)-M|\lt 1$$