This is a numerical-answer question. The correct answer is shown below.
[Solution by Dr. Abubacker] $B=\mu_0\frac mlI\Rightarrow m=\frac{Bl}{\mu_0I}=\frac{6.28\times10^{-3}\times0.5}{4\pi\times10^{-7}\times5}=\frac{3.14\times10^{-3}}{6.28\times10^{-6}}=500$. Answer: 500.