Answer
$$\lim_{x\to\infty}g(x)=\infty$$
$$\lim_{x\to-\infty}g(x)=-\infty$$
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{x^3+7x^2-2}{x^2-x+1}$$
The highest power of $x$ in the denominator here is $x^2$, so we divide both numerator and denominator by $x^2$: $$\lim_{x\to\infty}g(x)=\lim_{x\to\infty}\frac{x+7-\frac{2}{x^2}}{1-\frac{1}{x}+\frac{1}{x^2}}$$ $$\lim_{x\to\infty}g(x)=\frac{\lim_{x\to\infty}(x+7)-0}{1-0+0}=\frac{\lim_{x\to\infty}(x+7)}{1}$$ $$\lim_{x\to\infty}g(x)=\lim_{x\to\infty}(x+7)$$
As $x\to\infty$, $(x+7)$ approaches $\infty$ as well. Therefore, $$\lim_{x\to\infty}g(x)=\lim_{x\to\infty}(x+7)=\infty$$
(b) $$\lim_{x\to-\infty}g(x)=\lim_{x\to-\infty}\frac{x^3+7x^2-2}{x^2-x+1}$$
Again, we divide both numerator and denominator by $x^2$: $$\lim_{x\to-\infty}g(x)=\lim_{x\to-\infty}\frac{x+7-\frac{2}{x^2}}{1-\frac{1}{x}+\frac{1}{x^2}}$$ $$\lim_{x\to-\infty}g(x)=\frac{\lim_{x\to-\infty}(x+7)-0}{1-0+0}=\frac{\lim_{x\to-\infty}(x+7)}{1}$$ $$\lim_{x\to-\infty}g(x)=\lim_{x\to-\infty}(x+7)$$
As $x\to-\infty$, $(x+7)$ approaches $-\infty$ as well. Therefore, $$\lim_{x\to-\infty}g(x)=\lim_{x\to-\infty}(x+7)=-\infty$$