For simplicity I set $y = (\log z)^2/2$, which is a real constant. Pass to logarithm: $$ n \log \left (1+\frac{y}{n}+O\left ( \frac{1}{n^{3/2}} \right ) \right ) = n\left [\frac{y}{n} + O\left ( \frac{1}{n^{3/2}} \right ) \right ] = y + O\left ( \frac{1}{n^{1/2}} \right ). $$
In the first equality I throwed away a term $O(1/n^2)$ within the parenthesis. Now exponentiate back! $$ e^y \cdot e^{O(1/n^{1/2})} = e^y \cdot \left [1 + O\left ( \frac{1}{n^{1/2}} \right ) \right ] = e^y + O\left ( \frac{1}{n^{1/2}} \right ). $$
In the first equality I throwed away a term $O(1/n)$ within the parenthesis.