How can I get the value for $\theta$ when $\cos(\theta) = \frac{\sqrt{3}-1}{2\sqrt2}$, $\sin(\theta) = \frac{\sqrt3+1}{2\sqrt2}$
I can give you a better way - We know that $\sin(2\theta)=2*\sin(\theta)\cos(\theta)$
So, multiplying both the given equations, we get
$\sin(2\theta)=$$2(3-1)\over{8}$$=$$1\over 2$
$2\theta=$$5\pi\over 6$
$\theta=$$5\pi\over 12$
But, in most general cases, you have to estimate the values. The intuition as to how to solve the problem, or what A and B to use, can be improved by practice.
EDIT: $2\theta = $$5\pi\over 6$ because sin is greater than cosine and hence, $\theta > 45^o$
$$\dfrac{\sqrt3}2\cdot\dfrac1{\sqrt2}-\dfrac12\cdot\dfrac1{\sqrt2}$$
$$=\cos\dfrac\pi3\cos\dfrac\pi4-\sin\dfrac\pi3\sin\dfrac\pi4$$
Use $\cos(A+B)=\cos A\cos B-\sin A\sin B$
Similarly for sine