in this case, denoting u as final velocity of the ball in lab frame, firstly we have
\vec v' = \vec u - \vec V, \quad \vec u\cdot\vec v = 0.
We do know that \vec v_0 = \vec v -\vec V and \vec v' = -\vec v_0, so \vec V - \vec v = \vec u - \vec V, or, multiplying by \vec v,
2(\vec V\cdot \vec v) = \vec u\cdot\vec v + v^2 = v^2.
2(\vec V\cdot\vec v) = 2vV\cos(\theta_1-\theta_2) = v^2. Remembering that V\cos \theta_2 = v\cos \theta_1, we get
\cos\theta_2 = \cos\theta_1 \cdot 2\cos(\theta_1-\theta_2)= 2\cos\theta_1(\cos\theta_1\cos\theta_2 +\sin\theta_1\sin\theta_2) \rightarrow \\ 2\cos^2\theta_1 + \sin{2\theta_1}\tan\theta_2 = 1 = (1+\cos{2\theta_1}) + \sin{2\theta_1}\tan\theta_2.
\tan\theta_2\tan{2\theta_1} = -1.
I know I got it a bit complicated, so if I was somewhere wrong, please tell me. Or else you can do a graphical method, which is quite easier :).