You must be careful with that line of reasoning here is an example.

using your logic above when we evaluate at you get

is undefinded

but that is not correct now factor the denominator and reduce to get

To convince your self draw a plot of

Then graph the function and guess what the limit will be.

This is called an indeterminate form i.e or both types of limits can be calculated using L'Hosiptials rule or better yet infinite series.