Let $f$ and $g$ be analytic on a connected open set $U$. Assume that the closed disc $\overline{D(z_0,r)}$ is contained in $U$, where $r$ is a positive number. Show that if $|f(z)|=|g(z)|$ on the circle $|z-z_0|=r$ then there is a constant $\lambda$ with $|\lambda|=1$ such that $f=\lambda g$ on $U$.
Use the Maximum modulus principle and the zeros of an analytic function.