$$\sin 5\theta=0$$
$\sin x =0$ has solutions $x=n\pi$
Thus we get $$5\theta=n \pi$$
$$\theta= \frac{n\pi}{5}\hspace{10pt} n\in Z$$
Also $$\sin 2\theta=-\dfrac{1}{2}$$
$$2\theta=2n\pi-\frac{\pi}{6} \implies \theta=n\pi-\frac{\pi}{12}\hspace{10pt} n\in Z$$
$$2\theta=(2n+1)\pi+\frac{\pi}{6} \implies \theta=n\pi+\frac{7\pi}{12}\hspace{10pt} n\in Z$$
Note that when you square the equation
$$(\sin x + \cos x)^2 = (\sin x \cos x)^2$$
which can be factorized as
$$(\sin x + \cos x - \sin x \cos x)(\sin x + \cos x + \sin x \cos x)=0$$
you effectively introduced another equation $\sin x + \cos x =- \sin x \cos x$ in the process beside the original one $\sin x + \cos x = \sin x \cos x$. The solutions obtained include those for the extra equation as well.
Normally, you should plug the solutions into the original equation to check and exclude those that belong to the other equation. However, given the complexity of the solutions, it may not be straightforward to do so. Therefore, the preferred approach is to avoid the square operation.
Here is one such approach. Rewrite the equation $\sin x + \cos x = \sin x \cos x$ as
$$\sqrt2 \cos(x-\frac\pi4 ) = \frac12 \sin 2x = \frac12 \cos (2x-\frac\pi2 ) $$
Use the identity $\cos 2t = 2\cos^2 t -1$ on the RHS to get the quadratic equation below
$$\sqrt2 \cos(x-\frac\pi4) = \cos^2 (x-\frac\pi4 ) -\frac12$$
or
$$\left( \cos(x-\frac\pi4) - \frac{\sqrt2-2}2\right)\left( \cos(x-\frac\pi4) - \frac{\sqrt2+2}2\right)=0$$
Only the first factor yields real roots
$$x = 2n\pi + \frac\pi4 \pm \cos^{-1}\frac{\sqrt2-2}2$$
Best Answer
You made a mistake:
$$ \sin x - \cos x=\sqrt2\sin\left(x\color{red}-\frac\pi4\right). $$
The correctness of the last expression can be easily verified by trigonometric summation formula:
$$ \sin(x+y)=\sin x \cos y+\cos x \sin y. $$