I came across this limit exercise in a book:
$$\lim_{x \to -5}\frac{x^2-25}{x+5}$$
which is then manipulated to $$\lim_{x \to -5}(x-5)=-10$$
But why is just substituting $x=-5$ and letting everything be $0$ considered an invalid move? The ratio of numerator and denominator should remain the same no matter what algebraic manipulation we perform right (multiplying fraction by $(x+5)$)? So how are we getting a different ratio by removing $(x+5)$ from both numerator and denominator?