$f$ is a piecewise function defined as $f(x)=x$ if $x\not= 2$, and $f(x)=5$ if $x=2$. What is the limit of $f$ as $x$ approaches $2$? Is the answer $2$ or $5$? I'm guessing the answer is $2$ but am I correct or wrong?
Go back to the definition of a limit.
Approach from the left side and the right side.
A limit of a real function is just the value of $f$ as you approach the point of interest. It's not the value of f AT the point of interest. This is true only if f is continuous there.
If you approach from the left, the value of your function approaches $2$. If you approach from the right, the value of your function approaches $2$. You can prove this by using the $\epsilon$ /$\delta$ definition (which will be defined in any calculus/analysis book)
So your answer should be $2$ !