A rational function cannot have both a slant and horizontal asymptote so since this function has a slant asymptote we can eliminate the horizontal asymptote from consideration
The x intercepts tell us where the function equals zero so this gives us factors of (x+6) and (x-2) in the numerator
The vertical asymptote tells us where the function is undefined which is where the denominator equals zero so we have a factor of ( x+1) in the denominator
A slant asymptote occurs where the power of the numerator is greater than the power of the denominator and when we dive the numerator by the denominator we have a remainder which in this case is ( x/2 +3/2) which we will put as a factor in the numerator so we have
y = a(x+6)(x-2)(x/2+3/2)/x+1
Will use the y intercept values to solve for a
6= a(6+0)(0-2)(0/2+3/2)
6= a(-18)
a= (-1/3) so final equation is
y= (-1/3)((x+6)(x-2)(x/2+3/2)/(x-1)