In a polynomial fraction #f(x) = (p_n(x))/(p_m(x))# we have:

#1)# vertical asymptotes for #x_v# such that #p_m(x_v)=0#

#2)# horizontal asymptotes when #n le m#

#3)# slant asymptotes when #n = m + 1#

In the present case we have #x_v = {-2, 2}# and #n = m+1# with #n = 3# and #m = 2#

Slant asymptotes are obtained considering #(p_n(x))/(p_{n-1}(x))
approx y = a x+b# for large values of #abs(x)#

In the present case we have

#(p_n(x))/(p_{n-1}(x)) = x^3/(x^2-4)#

#p_n(x)=p_{n-1}(x)(a x+b)+r_{n-2}(x)#

#r_{n-2}(x)=c x + d#

#x^3 = (x^2-4)(a x + b) + c x + d#

equating coefficients

#{
(4 b - d=0), (4 a - c=0), (-b=0), (1 - a=0)
:}#

solving for #a,b,c,d# we have #{a = 1, b = 0, c = 4, d = 0}#

substituting in #y = a x + b#

#y = x #