How to Solve Limits by Factoring
You can use the algebraic technique of factoring to solve “real” limit problems. All algebraic methods involve the same basic idea. When substitution doesn’t work in the original function — usually because of a hole in the function — you can use algebra to manipulate the function until substitution does work (it works because your manipulation plugs up the hole).
Here’s an example of solving a limit by factoring:

Try plugging 5 into x — you should always try substitution first.

Factor:

Cancel the (x – 5) from the numerator and denominator.

Now substitution will work.
= 5 + 5
= 10
And note that the limit as x approaches 5 is 10, which is the height of the hole at (5, 10).