The magnetic field at O due to current in DA is B1=4πμ0aI×6π(directed vertically upwards) The magnetic field at O due to current in BC is B2=4πμ0bI×6π (directed vertically downwards) The magnetic field due to current AB and CD at O is zero.therefore the net magnetic field is B=B1−B2 (directed vertically upwards)=4πμ0aI6π−4πμ0bI×6π=24μ0I(a1−b1)=24abμ0I(b−a)