Answer
(a) $\frac{x}{1-2x}$, domain: $(-\infty,0)U(0,\frac{1}{2})U(\frac{1}{2},\infty)$
(b) $x-2$, domain: $(-\infty,2)U(2,\infty)$
Work Step by Step
(a) Given $f(x)=\frac{1}{x-2}, x\ne2$ and $g(x)=\frac{1}{x}, x\ne0$, we have $(f\circ g)(x)=f(g(x))=\frac{1}{\frac{1}{x}-2}=\frac{x}{1-2x}$. From $1-2x\ne0$, we have $x\ne\frac{1}{2}$. Combine all the conditions, we can find its domain: $(-\infty,0)U(0,\frac{1}{2})U(\frac{1}{2},\infty)$
(b) $(g\circ f)(x)=g(f(x))=\frac{1}{\frac{1}{x-2}}=x-2$. Combine all the conditions, we can find its domain: $(-\infty,2)U(2,\infty)$