First make it so that the part with the exponential is alone like $$-e^{-\frac{n^2}{2N}}\approx -\frac{1}{2}$$Then take logs of both sides getting $$\frac{n^2}{2N}=\log\bigg(-\frac{1}{2}\bigg)$$
Using log laws you can see how the last line is achieved.
$$1-e^\frac{-n^2}{2N} \approx \frac{1}{2}\iff-e^\frac{-n^2}{2N} \approx \frac{1}{2}-1\iff e^\frac{-n^2}{2N} \approx \frac{1}{2}\iff\frac{-n^2}{2N} \approx\log \frac12\\\iff n^2 \approx2N\log 2\iff n \approx\sqrt{2\log 2}\sqrt N$$