Understand what? That you have to factor them? As Janhaa said, that's not true- there are other methods. Of course, you cannot just set x= 3 because that gives 0/0 which has no meaning.
That you can factor them? That's due to a fundamental algebra rule: a polynomial is 0 for x= a if and only if it has x- a as a factor.
Here, because setting x= 3 the numerator becomes 3^2+ 2(3)- 15= 0 so we know that x- 3 is a factor. And since 3(a)= -15, requires that a= -5, we know that the other factor must be x- (-5)= x+ 5:
x^2+ 2x- 15= (x- 3)(x+ 5).
At x= 3, the denominator becomes 3^2- 5(3)+ 6= 0 so we know that x- 3 is a factor of this also. and since 3(a)= 6 requires that a= 2, we know the other factor must be x- 2:
x^2-5x+ 6= (x- 2)(x- 3).
Then the fraction is \frac{x^2+ 2x- 15}{x^2- 5x+ 6}= \frac{(x- 3)(x+ 5)}{(x- 3)(x- 2)}
Now, as long as x is NOT 3[/tex], we can cancel those terms to get \frac{x+ 5}{x- 2} and setting x= 3 in that we have \frac{3+ 5}{3- 2}= 8 which tells us that \lim_{x\to 3}\frac{x^2+ 2x- 15}{x^2- 5x+ 6}= 8.
Notice I said "as long as x is NOT 3". We cannot divide by 0 so that reduction is NOT true for x= 3. AT x= 3, this function is not defined- it has no value. But there is a theorem (unfortunately, often overlooked in introductory courses) that says "if f(x)= g(x) in some neighborhood of a but NOT necessarily at x= a (what is called a "deleted neighborhood) then \lim_{x\to a}f(x)= \lim_{x\to a}g(x)".