The correct option is A out of the plane i.e. +Z axis
Using Biot- Savart law, magnetic field due to current carrying element is given by
−→dB=μ0i4π→dl×→rr3
Thus, direction of magnetic field −→dB due to current carrying wire depends on →dl×→r, means −→dB will be perpendicular to both →dl and →r.
By applying right-hand thumb rule for any current element on PQ, we can easily get the direction of magnetic field at point O and that will be pointing out of the given X−Y plane i.e. +Z axis.
∴ option (a) is correct.