(b) Torque($\tau$) is given by
$\ \ \ \ \ \ \tau = \left| \mathbf{M} \times \mathbf{B} \right|$
Where M is magnetic dipole moment of loop given by,
$\mathbf{\ \ \ \ M} = i\mathbf{A}$
$\mathbf{\therefore M} = (i\pi r^{2})\widehat{\mathbf{k}}$
$\ \ \ \ \ \ \tau = |\mathbf{M} \times \mathbf{B| = (}\pi r^{2}iB_{x}\mathbf{)}$
Now, torque of weight will be mgr.
$mgr = \pi r^{2}iB_{x}$
$\Rightarrow \ \ i = \frac{mg}{\pi rB_{x}}$