Answer
$$\cos \left(x^{-1}\right)$$
Domain: $\{x: x \neq 0\}$
$$ \ (\cos x)^{-1} $$
Domain: $\{x: x \neq (2 k+1) \frac{\pi}{2}\} $
Work Step by Step
We are given the functions:
$$ h(x)=\cos x \text { and } g(x)=x^{-1}$$
We find the composite function as:
\begin{align*}
(h \circ g)(x)&=h(g(x))\\
&=h\left(x^{-1}\right)\\
&=\cos \left(x^{-1}\right)
\end{align*}
The domain is $\{x: x \neq 0\}$
Next, we find:
\begin{align*}
(g \circ h)(x)&=g(h(x))\\
&=g(\cos x)\\
&=(\cos x)^{-1}
\end{align*}
Domain is $\{x: \cos x \neq 0\}$, so $\{x: x \neq (2 k+1) \frac{\pi}{2}\} $