Firstly, we have the formula $log(z) = ln|z| + i \cdot arg(z)$ and $z:=log(\pm(2n+1)\pi i)$.

Then by plugging $z$ into that formula we have $ln((2n+1)\pi) + i\cdot arg(\pm(2n+1)\pi i)$.

Note that $\pm(2n+1)\pi i$ is always on the y-axis/imaginary-axis.

Thus $i\cdot arg(\pm(2n+1)\pi i) = i\cdot (\frac{1}{2} + m) \cdot \pi$. Plus we need $m\pi$ here since it is periodic.

Also we will not have $2m\pi$ since it does not include all the case we have in this question. We need to remember we have to include the all y-axis.

About part b of this problem, I did by setting n=0,1,2,... and try m correspondingly. You will see the restriction we have: $D \in {z:|z|<3}$ does not include many cases. Only when $n=0$ and $m=\pm1$ work here (n goes beyond 1 will break our restriction).

Hope it will be helpful