Magnetic field due the portions BC and B′C′ each is zero.
Magnetic field due to AB : <br/>B1=4π(PB)μ0I[sinθ1+sinθ2]<br/>
where, θ1=0∘ and θ2=90∘ <br/><br/>⇒B1=4πrμ0I[0+1]<br/>⇒B1=4πrμ0I (Into the paper) <br/><br/>
Magnetic field due to A′B′ : <br/>B2=4π(PB′)μ0I[sinθ1′+sinθ2′]<br/>
where, θ1′=0∘ and θ2′=90∘ <br/>⇒B2=4π(rμ0I[0+1]<br/> <br/>⇒B2=4πrμ0I (Into the paper) <br/>
Thus, total magnetic field at P,Bp=B1+B2=4πrμo(2I) (Into the paper)