How to find the domain and range of $f(x) = \sqrt {\frac{x+1}{x+2}}$ 
Find the domain and range of $$f(x) = \sqrt {\frac{x+1}{x+2}}$$

I got the domain $[-1, \infty)$ but the answer contains $(-\infty, -2)$ along with it. And how to calculate range?

We must have $$\frac{x+1}{x+2}\geq 0.$$ We consider the following cases:
Case 1. Suppose that $x+1\geq 0$ and $x+2>0$. Then $x\geq -1$ and $x>-2$. Thus,
$$SS_1=[-1,\infty).$$
Case 2. Suppose that $x+1\leq 0$ and $x+2<0$. Then $x\leq -1$ and $x<-2$. Thus,
$$SS_2=[-\infty,-2).$$
Hence, domain$=SS_1\cup SS_2$
Let $y=f(x)=\sqrt{\frac{x+1}{x+2}}$. Note that $y\geq 0$. Now,
$$y^2=\frac{x+1}{x+2}=1-\frac{1}{x+2}$$ and we get
$$x=\frac{1}{1-y^2}-2\qquad;y\neq\pm 1$$
Because $y\geq 0$, it follows that the range is $\Bbb R\smallsetminus\{1\}$. For completeness the graph is given below:

