Answer
The domain of $(f \circ g) (x)$ is $(\mathbb R-\{0\}$
The domain of $(g \circ f)(x)$ is $(0,\infty)$
Work Step by Step
We are given:
$f(x)=\log x$
$g(x)=x^2$
$(f \circ g) (x)=f(g(x))=\log x^2$
$(g \circ f)(x)=g(f(x))=(\log x)^2$
The domain of $(f \circ g) (x)$ is $(\mathbb R -\{0\}$ and the domain of $(g \circ f)(x)$ is $(0,\infty)$