Answer
a)$$(f \circ g )(x)= \frac{2x}{x+1}$$
b)$$D_{f \circ g}= \mathbb{R} - \{ -1, 0 \}$$
Work Step by Step
a) Given $f(x)=\frac{2}{x+1}$ and $g(x)= \frac{1}{x}$, we have$$(f \circ g)(x)= f(g(x))=\frac{2}{\frac{1}{x}+1}=\frac{2}{\frac{x+1}{x}}=\frac{2x}{x+1}$$
b) Please note that the domain of the function $f \circ g$ is the set of all $x$’s in the domain of $g$ such that $g(x)$ lie in the domain of $f$. The domain of $g$ is $\mathbb{R}- \{ 0 \}$, and the domain of $f$ is $\mathbb{R}- \{ -1 \}$. Hence, the domain of $f \circ g$ is all $x \in \mathbb{R} - \{ 0 \}$ such that $\frac{1}{x} \neq -1$, i.e., $x \neq -1$. Thus,$$D_{f \circ g}= \mathbb{R} - \{ -1, 0 \}.$$