I want to prove the statement of the question. I know we should apply some form of the maximum modulus principle, however, I don't know which function to pick, because the absolute values are quite distracting.
I think the first step to prove this is to see that $f+g$ is constant. For that, we could restrict our attention to a disc $D(z_0;R)\subset U$ for a suitable $R>0$ since the latter is an open subset. If we can prove that $f+g$ is constant in that disc, we can conclude from the identity theorem that it must be constant in the whole $U$. By the maximum modulus theorem we can obtain a $z_1\in\partial D(z_0;R)$ such that $$|f(z)+g(z)|\leq|f(z_1)+g(z_1)|$$ And from the triangle inequality $$|f(z_0)+g(z_0)|\leq|f(z_1)+g(z_1)|\leq |f(z_1)|+|g(z_1)|\leq |f(z_0)|+|g(z_0)|$$ However, I don't know how to conclude from this that we must get $|f(z_0)+g(z_0)|=|f(z_1)+g(z_1)|$, and hence that $f+g$ is constant on $D(z_0;R)$.
But once we prove that $f+g$ is constant, how should we proceed to prove that both $f$ and $g$ are constant? My idea is that if both are not constant functions, we should deduce from the hypothesis they must attain some local maxima in $U$, which cannot happen if those aren't constant functions.
Thanks in advance for your help.