Limits: factoring out x from $\lim _{x\to +\infty }\left(\frac{5-x^3}{8x+2}\right)$

So my teacher said that I cannot use arithmetic operation to factor out x from this type of equation, saying that it’s because it’s composed only by addition and subtraction. But I don’t understand clearly, because I get the right answer (according to the book):

$ \lim _{x\to +\infty }\left(\frac{5-x^3}{8x+2}\right) =\lim _{x\to \infty \:}\frac{x×\left(\frac{5}{x}-x^2\right)}{x×\left(8+\frac{2}{x}\right)}=\lim _{x\to \infty \:}\frac{\frac{5}{x}-x^2}{8+\frac{2}{x}}=\frac{\lim _{x\to \infty \:}\left(\frac{5}{x}-x^2\right)}{\lim _{x\to \infty \:}\left(8+\frac{2}{x}\right)}=\frac{\lim _{x\to \infty \:}\left(\frac{5}{x}\right)-\lim _{x\to \infty \:}\left(x^2\right)}{\lim _{x\to \infty \:}\left(8\right)+\lim _{x\to \infty \:}\left(\frac{2}{x}\right)}=\frac{0-\infty }{8+0}=\frac{-\infty \:}{8}$

Applying the infinity property: $ \frac{-\infty }{-c}=\infty $

$ =-\infty $

Can someone explain to me why I can’t factor x out?