Step 1: Magnetic field on the axis of a circular loop.
Magnetic field at a point on the axis of a circular loop is given by
\[
B = \frac{\mu_0 I r^2}{2(r^2 + x^2)^{3/2}}
\]
where \(x\) is the distance from the centre of the loop.
Step 2: Magnetic field due to loop \(P\).
For loop \(P\), current is \(I\) and distance from point \(O\) is \(r\).
\[
B_P = \frac{\mu_0 I r^2}{2(2r^2)^{3/2}} = \frac{\mu_0 I}{4\sqrt{2}r}
\]
Direction is towards \(P\) using right-hand thumb rule.
Step 3: Magnetic field due to loop \(Q\).
For loop \(Q\), current is \(4I\) and distance from point \(O\) is also \(r\).
\[
B_Q = \frac{4\mu_0 I r^2}{2(2r^2)^{3/2}} = \frac{\mu_0 I}{\sqrt{2}r}
\]
Direction is towards \(Q\).
Step 4: Find net magnetic field.
Since fields are in opposite directions, net field is
\[
B_{\text{net}} = B_Q - B_P = \frac{\mu_0 I}{\sqrt{2}r} - \frac{\mu_0 I}{4\sqrt{2}r}
= \frac{3\mu_0 I}{4\sqrt{2}r}
\]
Direction is towards \(P\).