A funcion of the type (f(x))/(g(x)) is not defined for values for which g(x)=0.
But let g(x)=a(x-alpha)(x-beta)(x-gamma) and if any of (x-alpha),(x-beta) or (x-gamma) - say (x-beta) is a factor of f(x) too, we can still get the value of function as (x-beta) cancels out.
We call a hole at x=beta , as on both sides of x=beta, (f(x))/(g(x)) is not only defined, the value of the function (f(x))/(g(x)) can also be find using limits.
Observe that y=(x^3-1)/(x^2+2x) can be written as ((x-1)(x^2+x+1))/(x(x+2) and their is no common factor between numerator and denominator. As such their is no hole.
Further as we have x(x+2) in denominator when x->0 or x->-2, from left or right function, the function y->+-oo, hence, we have vertical asymptote at x=0 and x=-2.
We have horizontal asymptote if degrees of f(x) and g(x) are equal and an obliique or slanting asymptote if degree of f(x) is just one more than that of g(x).
Hence here we have an obliique or slanting asymptote. As y=(x^3-1)/(x^2+2x)=(x-1/x^2)/(1+2/x) and as x->oo, we have y=x and we have obliique or slanting asymptote as y=x.
graph{(x^3-1)/(x^2+2x) [-41.33, 38.67, -22.32, 17.68]}