Proof (identity theorem)

Define $h(z) = f(z) - g(z)$, which is holomorphic on $U$, and $S=h\inv(0) = \sb{z\in U}{f(z) = g(z)}$ be its zero set. Suppose $w\in S$ is an accumulation point of $S$. This means for all $ε>0$, we have $(B(z,ε)\setminus \set{z})\cap S\neq \emptyset$. Picking $ε>0$ such that $B(z,ε)\subseteq U$, $h$ violates the principle of isolated zeros on $B(z,ε)$, so $h\equiv 0$ on $B(z,ε)$.

To show $h\equiv 0$ on $U$, consider $$ \begin{align*} V ={}& \sb{z\in U}{h^{(n)}(z) = 0 \quad \forall z\geq 0} \tag{1}\\ ={}& \sb{z\in U}{h\equiv 0 \text{ on a neighbourhood of }z}, \tag{2} \end{align*} $$ which we have used the Taylor series expansion of $h$.

(1) shows $V = \bigcap_{n\geq 0} (h^{(n)})\inv(0)$ is the intersection of closed sets and thus closed, and (2) shows that $V$ is open. So $U=V\cup (U\setminus V)$ defines a separation of the connected set $U$, unless either $V$ or $U\setminus V$ is empty. But $z\in V$, so we must have $V = U$ and thus $h\equiv 0$ on $U$.