How to find $f(x)$ and $g(x)$ when only given $f(g(x))$ I've learned how to find $f(g(x))$ when given the two $f(x)$ and $g(x)$ functions fairly easily, but I haven't found anywhere online showing how to do the opposite. For this question I'm working on I'm asked to find $f(x)$ and $g(x)$ if $\cos^2(x) = f(g(x))$. 
Can anyone please help me figure out how to solve this? Also if someone could provide a website that helps explain this that would be greatly appreciated.

This isn't possible to do uniquely, since for example
$$
f\left(x\right)=x
$$
and
$$
g\left(x\right)=\cos^{2}x
$$
gives you the desired result. However, I think the answer they are looking for is
$$
f\left(x\right)=x^{2}
$$
and
$$
g\left(x\right)=\cos x
$$
so that
$$
f\left(g\left(x\right)\right)=\left(\cos x\right)^{2}\equiv\cos^{2}x.
$$
Sounds like you have yourself a bad teacher/textbook.
