Find constant $a$ in way that $\lim_{x\rightarrow -2} \frac{3x^2+ax+a+3}{x^2+x-2}$ has limit Problem
If there exists $a \in \mathbb{R}$ such that:
$$ \lim_{x\rightarrow -2} \frac{3x^2+ax+a+3}{x^2+x-2} $$
has limit in $-2$. If such $a$ exists what is limit in $-2$ ?
 Attempt to solve 
My idea was first to try factorize denominator and then find factor of nominator in a way that these two cancel each other. 
factorizing denominator gives:
$$ \lim_{x \rightarrow -2}\frac{3x^2+ax+a+3}{(x-1)(x+2)} $$
Now if it is possible to find solution to $3x^2+ax+a+3=0$ when $x=-2$
$$ 3(-2)^2+a(-2)+(-2)+3=0 $$
$$ 12-2a-2+3=0 $$
$$ 2a=13 \iff a = \frac{13}{2} $$
factorizing nominator gives:
$$ 3x^2+\frac{13x}{2}+\frac{19}{2}=0 $$
$$ x= \frac{-\frac{13}{2}\pm \sqrt{(\frac{13}{2})^2-4\cdot 3 \cdot (\frac{19}{2})}}{2\cdot 3} $$
Only problem is this equation is never zero with $x\in \mathbb{R}$ since there is negative value under square root. Now there is contradiction between $a=\frac{13}{2}$ and that equation $3x^2+ax+a+3=0$ when $a=\frac{13}{2}$ and $x=-2$
$$ 3(-2)^2+\frac{13}{2}\cdot (-2)+\frac{13}{2}+3 \neq 0 $$
There is clearly something wrong but i cannot see where this went wrong. 

Since the denominator at $x=-2$ is equal to $0$ it is necessary that also the numerator at $x=-2$ is equal to $0$ that is
$$3(-2)^2+a(-2)+a+3 =0 \implies a=15 $$
and therefore
$$\lim_{x \rightarrow -2}\frac{3x^2+15x+18}{x^2+x+2}=\lim_{x \rightarrow -2}\frac{3(x+2)(x+3))}{(x-1)(x+2)}$$
