First of all, I would hesitate to call the following a "limit law":
If $f$ is continuous at $c$, then $\lim_{x\to c}f(x)=f(c)$.
This is because the statement "$f$ is continuous at $c$" by definition means $\lim_{x\to c}f(x)=f(c)$. This "limit law" is not a theorem, but rather just what it means for $f$ to be continuous at $c$.
The function $x\mapsto\frac{x^2+4x-12}{x^2-2x}$ is a rational function (i.e. the quotient of two polynomial functions). With a little work, we can prove the following theorem:
Every rational function $f$ is continuous—that is, at every point $c$ where $f$ is defined, $\lim_{x\to c}f(x)=f(c)$.
The proof consists of three stages:
- The "sum", "product", and "quotient" limit law. If $\lim_{x\to
c}f(x)=l$, and $\lim_{x\to c}f(x)=m$, then:
- $\lim_{x\to c}f(x)+g(x)=l+m$
- $\lim_{x\to c}f(x)g(x)=lm$
- $\lim_{x\to c}f(x)/g(x)=l/m$ (provided that $m\neq0$)
- Using the above laws, prove that every polynomial function is continuous (see https://math.stackexchange.com/questions/732115/how-can-i-prove-that-a-polynomial-with-degree-n-is-continuous-everywhere-in)
- Using the quotient law, prove that every rational function is continuous
Now, using the fact that rational functions are continuous, we see that if $c\neq0$ and $c\neq2$, then
$$
\lim_{x\to c}\frac{x^2+4x-12}{x^2-2x}=\frac{c^2+4c-12}{c^2-2c} \, .
$$
Unfortunately, this doesn't help us here as we are interested in the case $c=2$. However, by factorising, we see that for all $x$ such that $x\neq0$ and $x\neq2$, we have
$$
\frac{x^2+4x-12}{x^2-2x}=\frac{(x-2)(x+6)}{x(x-2)}=\frac{x+6}{x} \, .
$$
Let $g(x)=(x+6)/x$. Since there is a $\delta>0$ such that $f(x)=g(x)$ for all $x$ satisfying $0<|x-2|<\delta$, we must have
$$
\lim_{x\to 2}f(x)=\lim_{x\to2}g(x) \, .
$$
Since $g$ is a polynomial, it is continuous, i.e. $\lim_{x\to 2}g(x)=g(2)=4$. Now, suppose that we define the following function, as you did in your question (note that I am using $h$ instead of $f$):
$$
h(x)=\begin{cases}
\frac{x^2+4x-12}{x^2-2x} \quad &\text{if} \, x \neq 2\text{ and }x\neq0 \\
6 \quad &\text{if} \, x = 2 \\
\end{cases}
$$
Here, it is true that $\lim_{x\to 2}f(x)=\lim_{x\to 2}h(x)$ (again because there is a $\delta>0$ such that $f(x)=h(x)$ for all $x$ satisfying $0<|x-2|<\delta$). However, since $h$ is not a polynomial or a rational function, we do not know that $\lim_{x\to 2}h(x)=h(2)$. And, as it turns out, this is not the case.
However, since $\lim_{x\to 2}h(x)$ exists, it is possible to re-define $h$ so that it is continuous at $2$, here by setting $h(2)=4$. The fact that we can "patch" the removable discontinuity is why removable discontinuities are called "removable discontinuities" in the first place!