suppose there is a $\lambda>0$ such that $f(x)=g(x)$ when $|x-a|<\lambda$.prove that $\lim_{x \to a} f(x)=\lim_{x \to a} g(x)$
my attempt:
i think i find an easy proof which is : if $lim_{ x\to a} f(x)=l$
then that's means for every $\epsilon $ >0,there is a $\lambda' >0 $ such that if $0<|x-a|<\lambda'$ then $|f(x)-l|<\epsilon$,and because we care just about x's in ($a-\lambda $,$a+\lambda $ ) we can assume $\lambda ' <\lambda$,and in that interval we have $f(x)=g(x)$ .so if $0<|x-a|<\lambda'$ then $|f(x)-l|=|g(x)-l|<\epsilon$ which means that if $\lim_{ x\to a} f(x)=l$ then $\lim_{ x\to a} g(x)=l$ and also if $\lim_{ x\to a} g(x)=l$ then $\lim_{ x\to a} f(x)=l$. so finally: $\lim_{ x\to a} g(x)= \lim_{ x\to a} f(x)$.
-is my proof right ?
For completeness, here is the way I would phrase your proof.
Let $\lim_{x\to a} f(x) = l$. From the limit definition there exists a value $\lambda'$ such that, for any $\epsilon > 0$:
$$ |f(x) - l| < \epsilon \quad \text{for all} \quad |x-a| < \lambda'. $$
Define $\delta = \min\{\lambda, \lambda'\}$. Then for any given $\epsilon$, we have $$ |g(x) - l| = |f(x) - l| < \epsilon \quad \text{for all} \quad |x-a| < \delta. $$ (Note that this line required that $|x-a| < \lambda$ and that $|x-a|<\lambda'$, which is why $\delta$ is defined as above.) Thus $\lim_{x\to a} g(x) = l$.