<<Quaternions`;
aq=Quaternion[0,ax,ay,az];  (*A detector quaternion*)
bq=Quaternion[0,bx,by,bz];  (*B detector quaternion*)
sq=Quaternion[0,sx,sy,sz];  (*Singlet particle quaternion*)
A1=aq**-sq;  (*The minus sign on sq is for conservation of angular momentum*)
B1=sq**bq;
Simplify[A1**B1]

Which further simplifies to,

Quaternion[-(ax bx+ay by+az bz) ,-(az by-ay bz) ,(az bx-ax bz) ,-(ay bx-ax by)];

and we can see the real part is -a.b.  That was the right handedness so, now we do the left 
handedness.

A2=(-sq**aq);
B2=(bq**sq);
Simplify[B2**A2]

And here we see that the cross product terms will cancel out with the reverse order for the other
handedness.  Now, we average the two together

right=Simplify[A1**B1];
left=Simplify[B2**A2];
(right+left)/2

And we are just left with the real part of -a.b.