If $f(x)=(\sin x)^2$ and $g=(\cos x)^2$, would $\cos(2x)$ lie in space spanned by $f$ and $g$. What about $3+x$?
Can you write $\cos 2x$ as a linear combination of $\cos^2 x$ and $\sin^2 x$? So what can you say about whether or not it lies in the span?
As for $3+x$, consider instead the following:
Prove this first, and then deduce whether or not $3+x$ lies in the span.