Answer
$$\lim_{x\to\infty}g(x)=\lim_{x\to-\infty}g(x)=0$$
Work Step by Step
To solve these exercises, we would divide both numerator and denominator by the highest power of $x$ in the denominator.
Also remember that $$\lim_{x\to\infty}\frac{a}{x^n}=\lim_{x\to-\infty}\frac{a}{x^n}=a\times0=0\hspace{1cm}(a\in R)$$
(a) $$\lim_{x\to\infty}g(x)=\lim_{x\to\infty}\frac{10x^5+x^4+31}{x^6}$$
The highest power of $x$ in the denominator here is $x^6$, so we divide both numerator and denominator by $x^6$: $$\lim_{x\to\infty}g(x)=\lim_{x\to\infty}\frac{\frac{10}{x}+\frac{1}{x^2}+\frac{31}{x^6}}{1}$$ $$\lim_{x\to\infty}g(x)=\frac{0+0+0}{1}=0$$
(b) $$\lim_{x\to-\infty}g(x)=\lim_{x\to-\infty}\frac{10x^5+x^4+31}{x^6}$$
Again, we divide both numerator and denominator by $x^6$: $$\lim_{x\to-\infty}g(x)=\lim_{x\to-\infty}\frac{\frac{10}{x}+\frac{1}{x^2}+\frac{31}{x^6}}{1}$$ $$\lim_{x\to-\infty}g(x)=\frac{0+0+0}{1}=0$$