Limits can be calculated using this rule only if they take one of the two indeterminate forms:
If the previous condition is met the derivative of the function in the numerator over the derivative of the function in the denominator will give you the value of the limit.
e.g. given
From there you can simply directly substitute to get the solution.