How can $\frac{x^3-4x^2+4x}{x^2-4}$ be both $0$ and "undefined" when $x = 2$? Suppose I have a function defined as $$F(x)= \frac{x^3-4x^2+4x}{x^2-4}$$
Now I want to find the value of $F(2)$. I can do it in 2 ways:


*

*Put $x=2$ and solve the function. It will give:
$$F(2)=\frac{0}{0}$$ which is not defined.

*Solve $F(x)$ first and then put $x=2$. 
$$F(x)= \frac{x(x-2)^2}{(x-2)(x+2)}=\frac{x(x-2)}{x+2}$$
It will give $${F(2)=\frac{0}{4}}$$ which is zero.
How can zero equal not defined?

Remember that functions consist not only of rule of assignment but domain and codomain as well. So, let $$f\colon\Bbb R\setminus\{\pm2\}\to\Bbb R,\quad f(x) = \frac{x^3-4x^2+4x}{x^2-4}$$ and $$g\colon\Bbb R\setminus\{-2\}\to\Bbb R,\quad g(x)=\frac{x(x-2)}{x+2}$$
Just by inspecting domains you can immediately see that these are not equal functions. However, what you did show by your simplification is that restriction of $g$ on $\Bbb R\setminus\{\pm 2\}$ is equal to $f$, i.e. $f(x) = g(x)$ for all $x\neq\pm 2$.
This is rather a common mistake that I believe is due to how algebraic expressions are taught in high school, completely ignoring defining context in which this is allowed. It is allowed, for example, when one takes a limit of the functions:
$$\lim_{x\to 2} f(x) = \lim_{x\to 2} g(x) = g(2) = 0$$
But, $\lim_{x\to 2}f(x) = 0$ does not imply that $f(2) = 0$.
Another trivial example could be functions $f(x) = \frac xx$ and $g(x) = 1$ which are equal at all points but $x=0$. Again, natural domains of $f$ and $g$ are not equal.
