µ₀IiL/2π
2µ₀Ii/3π
µ₀Ii/2π
2µ₀IiL/3π
Here the sides AB and CD will contribute to the force, but the sides AD and BC will not because they are perpendicular to wire XY.
We know that the magnetic field at distance r from a long wire is
B = µ₀I/2πr
and also the force on a current (i) flowing through a line section of length L due to B is
F = BiL
Using these, the force on AB is
F₁ = (µ₀I/2π(L/2))iL = µ₀Ii/π
and the force on CD is
F₂ = (µ₀I/2π(L + L/2))iL = µ₀Ii/3π
As the current directions on AB and CD are opposite, so the forces will be opposite. Thus, net force
F = F₁ - F₂ = µ₀Ii/π - µ₀Ii/3π = 2µ₀Ii/3π