Proving the multiplicative property of limits. 
If $\lim_{x\rightarrow a}f(x) =L$ and $\lim_{x\rightarrow a}g(x) =M$ then prove $\lim_{x\rightarrow a}f(x)g(x) =LM$

Attempt
(Should there be any statement that I should write at start of this proof?)
 $$|f(x)g(x) -LM|=|f(x)g(x)+Lg(x)-Lg(x) -LM|=|g(x)[f(x)-L]+L[g(x)-M]<|g(x)|f(x)-L|+|L||g(x)-M|$$
Let $\epsilon>0$ then there exists $\delta_1, \delta_2$ such that 
$$|f(x)-L|<\frac{\epsilon}{2g(x)}~~ whenever~~ 0<|x-a|<\delta_1$$
$$|g(x)-M|<\frac{\epsilon}{2L}~~ whenever~~ 0<|x-a|<\delta_2$$
Choose $0<|x-a|<\delta$ where $\delta = \min(\delta_1,\delta_2)$ then we have
 $$|f(x)g(x) -LM|<\epsilon$$ 
Is this proof correct?
The reason I am concerned is in the second step where I defined the inequalities for the individual expression, I wrote it in terms of $g(x)$  and $L$. Is this step mathematically correct? 
Edit:
Is this continuation correct?
Let $\epsilon>0$ then there exists $\delta_1, \delta_2$ such that 
$$|f(x)-L|<\frac{\epsilon}{2(1+|M|)}~~ whenever~~ 0<|x-a|<\delta_1$$
$$|g(x)-M|<\frac{\epsilon}{2(1+|L|)}~~ whenever~~ 0<|x-a|<\delta_2$$
Choose $0<|x-a|<\delta$ where $\delta = \min(\delta_1,\delta_2)$ then we have
 $$|f(x)g(x) -LM|<|g(x)|\frac{\epsilon}{2(1+|M|)}+|L|\frac{\epsilon}{2(1+|L|)}<\frac{\epsilon}{2}+\frac{\epsilon}{2}=\epsilon$$ 
 A: No, it is not correct. As you noticed, your $\delta_1$ also depends on $g(x)$. Besides, you divide by $g(x)$. What if $g(x)=0$?
A: Your approach is fine but a few details are not correct.
You should replace 
$$|f(x)-L|<\frac{\epsilon}{2g(x)}$$
with something like
$$|f(x)-L|<\frac{\epsilon}{2M'}.$$
where $M'$ is a positive constant to be decided.
Recall that $\lim_{x\rightarrow a}g(x) =M$ implies that $g$ is bounded in a neighbourhood of $a$.
Moreover to avoid problems with the case when $L=0$, replace
$$|g(x)-M|<\frac{\epsilon}{2L}$$
for example with
$$|g(x)-M|<\frac{\epsilon}{2(1+|L|)}.$$
Are you able to finish to proof correctly now?
P.S. In your edited work add th following line $|g(x)|<{(1+|M|)}$ whenever $0<|x-a|<\delta_3$ and define $\delta = \min(\delta_1,\delta_2,\delta_3)$.
A: Fixed $0<\epsilon<1$. I would start from (your strict inequality in the first line of your proof is problematic)
$$
\begin{align}
&|f(x)g(x) -LM|=|f(x)g(x)+Lg(x)-Lg(x) -LM|\\
\leqslant&\ |g(x)|\cdot|f(x)-L|+|L|\cdot|g(x)-M|\\
\leqslant&\  (|g(x)-M|+|M|)\cdot|f(x)-L|+|L|\cdot|g(x)-M|
\end{align}
$$
and show the following:


*

*there exists $\delta_1$ such that
$$
|f(x)-L|<\epsilon,\quad \hbox{for all }\ 0<|x-a|<\delta_1;
$$

*there exists $\delta_2$ such that
$$
|g(x)-M|<\epsilon,\quad \hbox{for all }\ 0<|x-a|<\delta_2.
$$ 
By choosing the smaller one as $\delta$, one has
$$
|f(x)g(x)-LM|\leqslant (1+|M|)\epsilon +|L|\epsilon
\leqslant (1+|M|+|L|)\epsilon\tag{1}
$$
for all $x$ with $0<|x-a|<\delta$.

[Added:] To see why (1) completes the proof, do the following exercise. Show that the following two statements are equivalent:


*

*There exists some constant $C$ such that for every $\epsilon>0$, $|A|\leqslant C\epsilon$. 

*For every $\epsilon>0$, $|A|\leqslant \epsilon$.

Remark. One important tactic that is seldom mentioned in elementary real analysis textbooks is that when doing an estimate in analysis, one should never worry about the constant in front of one's epsilon. As Terry Tao points out in one of his excellent blog posts on problem solving strategies in real analysis:

Don’t worry too much about exactly what $\varepsilon$ (or $\delta$, or $N$, etc.) needs to be.  It can usually be chosen or tweaked later if necessary.

