Limits by algebra when substitution gives $0/0$
When substitution gives $\frac{0}{0}$, rewrite the expression (factor and cancel, or multiply by a conjugate) into one that equals it everywhere near $c$ except at $c$, and substitute into that.
From AP Calculus AB.