Find $a,b$ at $f(x)=\frac{x^2+x-12}{x^2-ax+b}$ An High school question:

Given :$$f(x)=\frac{x^2+x-12}{x^2-ax+b}$$ it's given that $x=3$ is a vertical asymptote find $a$ and $b$.

I tried: 
Since  $x=3$ is a vertical asymptote then $3^2-3a+b=0$, but now what

Note that $x^2+x-12$ also has $3$ as a root, so for an asymptote to exist we require $3$ to be a repeated root. Hence $x^2-ax+b=(x-3)^2\implies a=6,\,b=9$.
