We have $\tan(x) = 3$
Draw a right angle triangle where $x$ is one of the angle, let the opposite side be of length $3$, let the adjacent side be of length one. Then by Pythagoras Theorem, the hypothenus side is $\sqrt{10}$.
Hence you can compute $\sin(x)$ and $\cos(x)$ and multiply them.