The resultant magnetic field at P is found only along the axis.
Magnetic field being a vector quantity can be resolved into two components, one of magnitude δBsinϕ along the axis of the coil and δBcosϕ at right angles. The resultant field at P is divided along the axis and its magnitude is given by B=∫dBsinϕ
For current i flowing in the coil of radius r. B=4πμ0r2i∫dlsinϕ
From figure, sinϕ=rR B=4πμ0r3iRdl
Also, ∫dl=2πR and r=(R2+x2)1/2 ∴B=4πμ0(R2+x2)3/22πiR2=2(R2+x2)3/2μ0iR2
Since, coil has N turns, therefore B=2(R2+x2)3/2μ0NiR2