Over a certain set, you could use $g(x)=\cos^{-1}(\sin(x)),$ since then $f(g(x)=\cos(\cos^{-1}(\sin(x)))=\sin(x),$ since the cos and cos inverse cancel.
5
Bumbble Comm
On
$$h(x) = f(g(x))=\cos (g(x))=\sin x=cos(x-\frac{\pi}{2})$$ so
$ g(x)=2k\pi+x-\frac{\pi}{2}$ or $g(x)=2k\pi-(x-\frac{\pi}{2})$
Over a certain set, you could use $g(x)=\cos^{-1}(\sin(x)),$ since then $f(g(x)=\cos(\cos^{-1}(\sin(x)))=\sin(x),$ since the cos and cos inverse cancel.