I would recommend doing something a little different:
3dcalc -a 'A' -b 'B' -expr '1*step(a-3)+2*step(b-3)' -prefix common_mask
In the result, voxels that have value '1' are A-only, voxels with value '2' are B-only, and voxels with value '3' are A-and-B-together. With this as overlay, you can see all 3 possibilities (plus 0 = neither) at the same time, in different colors. If you want then to see only value=3 voxels in the overlay, just set the threshold slider to 2.9 or something like that.
Using this binary encoding is a powerful tool to see different combinations of thresholded results at one time. If you had a condition C, you could add '+4*step(c-3)' and then have all 8 combinations of conditions above threshold encoded into values 0-7.