This question is from my complex analysis assignment and I am not able to prove it.
Suppose $f(z)$ and $g(z)$ are analytic inside and on a simple contour $C$, with $\operatorname{Re} f(z)= \operatorname{Re} g(z)$ on $C$. Show that $f(z)=g(z)+i \beta$ inside $C$, where $\beta$ is a real constant.
I am not able to decide which theorem would be appropriate for proving this.
For background, I am taking a course in complex analysis this semester.