A square loop ABCD carrying a current i, is placed near and coplanar with a long straight conductor XY carrying a current I, the net force on the loop will be :

The direction of current in conductor

XY and AB is same
B (attractive)
(B repulsive)
Therefore the net force on the loop