An attractive force will act normal to X towards Y because the direction of the currents in the wires is the same.
Force exerted on length l due to the magnetic field is given as F=FXY=FYX=I1l1B12
⇒F=2πrμ0I1I2l1
Given here, I1=2A,I2=3A,l1=5m,r=5cm.
Putting the values, we have
F=2π×5×10−24π×10−7×2×3×50×10−2
=1.2×10−5N directed towards wire X.