Answer
(a) $$f(g(x)) = \frac{x+1}{x+2} + \frac{x+2}{x+1} $$ $$(-\infty, -2)∪(-2, -1)∪(-1, \infty)$$
(b) $$g(f(x)) = \frac{x+{\frac{1}{x}+1}}{{x+{\frac{1}{x}+2}}}$$ $$(-\infty, -1)∪(-1, 0)∪(0, \infty)$$
(c) $$f(f(x)) = x+\frac{1}{x}+\frac{1}{x+\frac{1}{x}}$$ $$(-\infty, 0)∪(0, \infty)$$
(d) $$g(g(x)) =\frac{2x+3}{3x+5}$$ $$(-\infty, -2)∪(-2, -\frac{5}{3})∪(-\frac{5}{3}, \infty)$$
Work Step by Step
$f(x) = x+\frac{1}{x}$
$g(x) =\frac{x+1}{x+2}$
(a) $f(g(x)) = \frac{x+1}{x+2} + \frac{1}{\frac{x+1}{x+2}} = \frac{x+1}{x+2} + \frac{x+2}{x+1} $
For the domain, we have two restrictions here: $\left\{\begin{array}{ll} x+2 \ne 0 \\ x+1\ne0\end{array} \right.$ $\left\{\begin{array}{ll} x \ne -2 \\ x\ne-1\end{array} \right.$
So, the domain is: $(-\infty, -2)∪(-2, -1)∪(-1, \infty)$
(b) $g(f(x)) = \frac{x+{\frac{1}{x}+1}}{{x+{\frac{1}{x}+2}}}$
We have two restrictions in this case too: $\left\{\begin{array}{ll} x \ne 0 \\ x+\frac{1}{x}+2 \ne0\end{array} \right.$ $\left\{\begin{array}{ll} x \ne 0 \\ x\ne-1\end{array} \right.$
So, we get the domain: $(-\infty, -1)∪(-1, 0)∪(0, \infty)$
(c) $f(f(x)) = x+\frac{1}{x}+\frac{1}{x+\frac{1}{x}}$
Our restrictions in this case, for the domain are: $\left\{\begin{array}{ll} x \ne 0 \\ x+\frac{1}{x} \ne0\end{array} \right.$ $\left\{\begin{array}{ll} x \ne 0 \\ x\ne0\end{array} \right.$
And the domain is: $(-\infty, 0)∪(0, \infty)$
(d) $g(g(x)) =\frac{\frac{x+1}{x+2}+1}{\frac{x+1}{x+2}+2} = \frac{\frac{x+1+x+2}{x+2}}{\frac{x+1+2x+4}{x+2}} = \frac{\frac{2x+3}{x+2}}{\frac{3x+5}{x+2}} = \frac{2x+3}{3x+5}$
And we have the restrictions: $\left\{\begin{array}{ll} x+2 \ne 0 \\ \frac{x+1}{x+2}+2 \ne0\end{array} \right.$ $\left\{\begin{array}{ll} x \ne -2 \\ 3x+5\ne0\end{array} \right.$ $\left\{\begin{array}{ll} x \ne -2 \\ x\ne-\frac{5}{3}\end{array} \right.$
And the domain is: $(-\infty, -2)∪(-2, -\frac{5}{3})∪(-\frac{5}{3}, \infty)$