You have $g(z)=zh(z^n)$ and $f(z)=zh(z)^n$ (for the evident $h$). Now if $f(z)=f(w)$ (for some $z,w$), i.e. $zh(z)^n=wh(w)^n$ then $z^{1/n}h(z)=w^{1/n}h(z)$ for _some_ choice of $z^{1/n},w^{1/n}$, i.e. $g(z^{1/n})=g(w^{1/n})$, so $z^{1/n}=w^{1/n}$ and thus $z=w$.