The magnitude of the magnetic field $(B)$ due to the loop $ABCD$ at the origin $(O)$ is :
$B_{1}=\frac{\mu_{o}}{4 \pi} \frac{I}{a} \times \frac{\pi}{6} \quad$ (directed verticallyupwards)
The magnetic field at $O$ due to current in $B C$ is
$B_{2}=\frac{\mu_{o}}{4 \pi} \frac{I}{b} \times \frac{\pi}{6} \quad$ (directed vertically downwards)
The magnetic field due to current $A B$ and $C D$ at $O$ is zero.
Therefore the net magnetic field is
$B=B_{1}-B_{2} \quad$ (directed vertically upwards)
$=\frac{\mu_{o}}{4 \pi} \frac{I}{a} \frac{\pi}{6}-\frac{\mu_{o}}{4 \pi} \frac{I}{b} \times \frac{\pi}{6}=\frac{\mu_{o} I}{24}\left(\frac{1}{a}-\frac{1}{b}\right)=\frac{\mu_{o} I}{24 a b}(b-a)$



