Why can $\lim_{x \to c} f(x)$ be found by simplifying $f(x)$? More formally, for $f(x)$ undefined at $x = c$, why does $\lim_{x \to c} f(x) = g(c)$, where $g(x)$ is an algebraic simplification of $f(x)$?
To use an example of this simplification from the Wikepedia page about limits,
$$
  \lim_{x \to 1} \frac{x^2 - 1}{x - 1}
= \lim_{x \to 1} \frac{(x+1)(x-1)}{x - 1}
= \lim_{x \to 1} (x + 1)
= 1 + 1 = 2.
$$
Here, the function $f(x) = (x^2 - 1)/(x - 1)$ is simplified to $g(x) = x + 1$, which is continuous at $x = 1$.  $g(1)$ is then evaluated to find the limit of $f(x)$.
How do we know that this results in the correct limit for every case where $f(x)$ can be simplified to a function defined at $x = c$?
 A: This is a good question! The general result underlying this argument is roughly: "two functions which are 'almost always' equal have the same limits everywhere." The idea, then, is that the simplification $g$ of the "bad" function $f$ agrees with $f$ at every point except the small (= finite) number of bad points where $f$ is undefined, so we can switch from $f$ to $g$.
This general result is often left unstated. However, I think that even though it's a bit abstract, it will ultimately help to get it out in the open (you can always ignore it for now and come back to it later of course), so below I've given a precise formulation of it.

The precise statement of the general result given above is the following:

Given two functions $f,g$, consider the set $$Disagree:=\{x: f(x)\not=g(x)\}$$ (where I use "$\not=$" in the broad sense: if $f(a)$ is undefined and $g(a)$ is defined, then $a\in Disagree$). Suppose this set consists only of isolated points (that is, whenever $f(a)\not=g(a)$ there is some $\delta>0$ such that for all $x\in (a-\delta, a+\delta)$ other than $x=a$ we have $f(x)=g(x)$).
Then for every $c$ we have $$\lim_{x\rightarrow c}f(x)=\lim_{x\rightarrow c}g(x)$$ (that is, either both sides are undefined or both sides are defined and have the same value).

Crucially, every finite set consists only of isolated points; this is a good exercise. Consequently we have in particular:

Suppose $f, g$ are functions such that for all but finitely many numbers $x$ we have $f(x)=g(x)$. Then for every $c$ we have $\lim_{x\rightarrow c}f(x)=\lim_{x\rightarrow c}g(x)$.

If you're familiar with $\epsilon$-$\delta$ arguments, these claims are good exercises (start with the second one since it's easier to think about). Going back to your OP, the point is that switching from the original bad function $f$ to its "simplification" $g$ we only introduce one point of disagreement (namely $x=1$), so by the principle above $f$ and $g$ have the same limits everywhere even though they are different functions.
A: Because after you've performed the "simplification," what's left is a quotient of polynomials (which are continuous functions) in which the denominator is non-zero at $x=c$.  A quotient of functions continuous at $x=c$ in which the denominator is non-zero at $x=c$ is always continuous.
A: It is not a matter of whether $g$ is defined at $x=c$, but that $g$ is continuous there. Then we get $$ \lim_{x\rightarrow c} f(x)=\lim_{x\rightarrow c} g(x)= g(c).$$ Where I used first that $f(x)=g(x)$ for $x\neq c$ and then that $g$ is continuous at $x=c$.
