Theorem: $\lim_{x\to a}\ f(x)=L$ if and only if $\lim_{x\to a^-}\ f(x)=L$ and $\lim_{x\to a^+}f(x)=L$.
Proof:

First we suppose that $\lim_{x\to a}\ f(x)=L$. This means for all $\epsilon>0$ there exists a $\delta>0$ such that if $0< |x-a|< \delta$ then $|f(x)-L|< \epsilon$.

We want to show that $\lim_{x\to a^-}\ f(x)=L$ (the argument for $x\to a^+$ will be very similar).

Consider any $\epsilon >0$. We must find a $\delta>0$ such that if $0< a-x< \delta$ then $|f(x)-L|< \epsilon$.

By assumption we can find a $\delta>0$ such that if $0< |x-a|< \delta$ then $|f(x)-L|< \epsilon$. This $\delta$ will work for the desired conclusion since if $0< a-x< \delta$, then $0< |a-x|=|x-a|< \delta$, hence we get $|f(x)-L|< \epsilon$.

This shows that $\lim_{x\to a^-}\ f(x)=L$, and as mentioned before, the argument for $x\to a^+$ is similar.

Now suppose that $\lim_{x\to a^-}\ f(x)=L$ and $\lim_{x\to a^+}\ f(x)=L$.

This means for all $\epsilon>0$ there exists a $\delta_1>0$ such that if $0< a-x< \delta_1$ then $|f(x)-L|< \epsilon$, and there exists a $\delta_2$ such that if $0< x-a< \delta_2$ then $|f(x)-L|< \epsilon$.

We want to show that $\lim_{x\to a}\ f(x)=L$. Consider any $\epsilon >0$. We must find a $\delta>0$ such that if $0< |x-a|< \delta$ then $|f(x)-L|< \epsilon$.

Take $\delta=\text{min}(\delta_1,\delta_2)$ and assume $0< |x-a|< \delta$. Now either $x-a< 0$ or $x-a\ge 0$.

In the first case, $|x-a|=-(x-a)=a-x$, hence $0< a-x< \delta< \delta_1$, which implies $|f(x)-L|< \epsilon$.

In the second case, $|x-a|=x-a$, hence $0< x-a< \delta< \delta_2$, which also implies $|f(x)-L|< \epsilon$.

So in either case, we get $|f(x)-L|< \epsilon$, which shows that $\lim_{x\to a}\ f(x)=L$.