How do you find the slant asymptote of (x^3-1)/(x^2-9)?

It is obvious that as factors of denominator are $\left(x + 3\right) \left(x - 3\right)$, the function as two vertical asymptotes $x = 3$ and $x = - 3$.
Horizontal asymptotes are there if highest degrees of numerator and denominator are same. For example, if highest term in numerator is $a {x}^{n}$ and in denominator is $b {x}^{n}$, vertical asymptote will be $y = \frac{a}{b}$. But this is not so here.
Here the degree of numerator is just one more than that of denominator and ratio of highest degree of numerator and denominator is $x \frac{3}{x} ^ 2 = x$.
Hence, we have a slanting asymptote $y = x$.