(a) Let us assume a segment of length dx at a point P, a distance x from the centre shown in figure.
⊙ is the positive Z-direction and
⊗ is the negative Z-direction and

Magnetic field at P due to current in wires A and B will be in the directions perpendicular to AP and BP respectively as shown.

Therefore, net magnetic field at P will be along negative y= axis as shown

Therefore, force on the element will be (F = ilB)

∴ Total force on the wire will be

(in negative z-axis)
Hence


(b) If current in wire B is reversed, then magnetic fields due to A and B will be in the directions shown in figure. i.e., net magnetic field Vector Bnet will be along positive x-axis and since current is also along positive x-axis, force on wire OC will be zero.
Note : Vector B is not necessarily parallel to BP.