Sorry, but the only way I can explain how I understand the subject is with referring to this video from the Khan Academy, so please bear with me
https://www.youtube.com/watch?v=oUgDaEwMbiU
so here we go:
The way I like to think of it is that $f(x)$ and the function at 2:18 are two different functions, here I will refer to the 2:18 function as $g(x)$. I want you to think of $g(x)$ as a function that is defined at $-2$ (that makes sense because you can put the value of $-2$ into $g(x)$ and get a value). Now, visualize the x-y plane. $f(x)$ is exactly the same as $g(x)$ EXCEPT at $x=-2$ where $f(x)$ is not defined. However, at all values of $x$ other than $x=-2$, the two functions are equal. What this means is that (again, imagine an x-y plane) the limits of both $f(x)$ and $g(x)$ as $x$ approaches $-2$ are the same. Therefore, the limit of $f(x)$ as $x$ approaches $2$ will be the same as the limit of $g(x)$ as $x$ approaches $2$. (This is because we won't consider the value $f(-2)$ when calculating the limit, $x$ never actually becomes $-2$, it just gets closer and closer).