I am given the following question: I need to prove that two quaternions map to the same Rotation Matrix in SO3 Space. It is demonstrated by this image:
Let w be v here. I tried to work out the proof, but it isn't coming out correctly:
$Q=(cos\frac{\theta}{2},w.sin\frac{\theta}{2})$
$Q=cos\frac{\theta}{2}+w_{1}.sin\frac{\theta}{2}.\mathbf{i}+w_{2}.sin\frac{\theta}{2}.\mathbf{j}+w_{3}.sin\frac{\theta}{2}.\mathbf{k}$
As per image, replace $\theta$ with $2\pi-\theta$ and w with -w
$Q=cos\frac{2\pi-\theta}{2}+-w_{1}.sin\frac{2\pi-\theta}{2}.\mathbf{i}+-w_{2}.sin\frac{2\pi-\theta}{2}.\mathbf{j}+-w_{3}.sin\frac{2\pi-\theta}{2}.\mathbf{k}$
$Q=-cos\frac{\theta}{2}+w_{1}.sin\frac{\theta}{2}.\mathbf{i}+w_{2}.sin\frac{\theta}{2}.\mathbf{j}+w_{3}.sin\frac{\theta}{2}.\mathbf{k}$
It is not equal! I am left with $-cos\frac{\theta}{2}$ which is not matching. Please tell me how to fix this

Since $\sin(\pi-\theta/2)$ equals $\sin(\theta/2)$, not $-\sin(\theta/2)$, you're missing minus signs.
Note $\cos(\theta/2)+\sin(\theta/2)\mathbf{w}$ is expressible as $Q=\exp(\frac{1}{2}\theta\mathbf{w})$ (assuming $\|\mathbf{w}\|=1$).
Replacing $\theta\mapsto2\pi-\theta$ and $\mathbf{w}\mapsto -\mathbf{w}$ yields ${\bf\color{Red}{-}}Q$, not $Q$; you shouldn't be expecting the original quaternion in the first place. Both unit quaternions $Q$ and $-Q$ represent the same 3D rotation.