Simple limit of two functions Suppose $\lim\limits_{x\to\infty} f(x) = L$ and $\lim\limits_{x\to\infty}( g(x)-f(x))=0$. How to show that  $\lim\limits_{x\to\infty} g(x)=L$?
My attempt:
using the Cauchy's definition of limit, we can tell that for any $\varepsilon_f > 0$ there exists $x_f$ such that for all $x>x_f$ we have $|f(x)-L| <\varepsilon_f$.
For the second limit, there's $x_g$ such that for all $x>x_g$ we have $|g(x)-f(x)| <\varepsilon_g$.
How can we combine both to conclude that $\lim\limits_{x\to\infty} g(x)=L$? Adding both inequalities:
$|f(x)-L|+|g(x) - f(x)|<\varepsilon_f+\varepsilon_g$
Since there's an absolute value on the left side, the $f(x)$ won't cancel out, so I'm not sure what to do next.
 A: You are going on the right way. Here it is a solution:
Let $\epsilon > 0.$ Consider $\varepsilon_f = \varepsilon_g =  \varepsilon /2.$
Let $A= \max\{x_f,x_g \}$. For $x > A \geq x_f,x_g$ we have
$$ |g(x) - L| \leq |g(x) - f(x)| + |f(x) - L| < \varepsilon /2 + \varepsilon /2 = \varepsilon .$$
Then the limit of $g$ as $x\rightarrow \infty$ is $L.$
A: This answer may not be very instructive, but it is another case of how to prove something in analysis with a simple trick:
Assuming linearity of limits (a result typically shown the first time talking about limits),
$$\lim_{x\rightarrow\infty}g(x)=\lim_{x\rightarrow\infty}(g(x)-f(x)+f(x))=\lim_{x\rightarrow\infty}(g(x)-f(x))+\lim_{x\rightarrow\infty}f(x)=0+L.$$
A: Since $\lim_{x\to \infty}f(x)=L$, and $\lim_{x\to\infty}(g(x)-f(x))=0$, given $\varepsilon>0$, there exists some $x_{\varepsilon}>0$ such that
$$
\max\{|L-f(x)|,|g(x)-f(x)|\}\le \frac12\varepsilon \quad (\forall x>x_\varepsilon).
$$
Hence, for $x>x_\varepsilon$ we have:
$$
|L-g(x)|=|L-f(x)+f(x)-g(x)|\le |L-f(x)|+|f(x)-g(x)|\le \frac12\varepsilon+\frac12\varepsilon=\varepsilon,
$$
i.e. $\lim_{x\to \infty}g(x)=L$.
