Let $U$ be a region in $\mathbb{C}$. Assume that $U$ is symmetric with respect to the real axis, i.e., $z \in U \Rightarrow \overline{z} \in U$. Suppose that $f \in \mathcal{H}(U)$ is such that $f(J) \subseteq \mathbb{R}$, for some open interval contained in $U \cap \mathbb{R}$.
Show that $ f(U \cap \mathbb{R}) \subseteq \mathbb{R} \quad \text{and} \quad f(\overline{z}) = \overline{f(z)}, \quad \forall z \in U. $
I don't know how to proceed, I tried getting a function $g(z) = \overline{f(\overline{z})}$ which will also be a holomorphic function as f(z) is a holomorphic function but don't know where to go from here.