This is a corollary from my class. The proof contains a few claims whose derivation l'd like to see in details, to make sure I'm not missing out on anything.
Corollary: If $f: U \rightarrow \mathbb{C}$ is holomorphic and $h: f(U) \rightarrow \mathbb{R}$ is harmonic, then $h \circ f: U \rightarrow \mathbb{R}$ is harmonic.
Proof: Let $z_{0} \in U$. On an open neighborhood of $f\left(z_{0}\right), h$ is a real part of a suitable holomorphic function $H$ (claim 1). By the chain rule, $H \circ f$ is holormorphic on a small neighborhood of $z_{0}$ (claim 2). $Re(H \circ f)=h \circ f$ (claim 3 ) is harmonic (claim 4).
Claims 1 and 4 are from previous materials which I have understood. I tried to show claim 2 by applying the Cauchy-Riemann equations to $H \circ f$, but not sure that I got it right. As this is my first attempt to do calculus after a while, please keep the proof at the 1st-2nd year undergrad level if possible.