analytic function on the upper half plane that maps to right half plane is constant.

Let $$f$$ be analytic on the upper half plane $$\mathbb{H}$$ and continuous on $$\overline{\mathbb{H}}$$. Assume that $$\Re f(z)\geq 0$$ on $$\mathbb{H}$$ and $$f(x)\in \mathbb{R}$$ for $$x\in \mathbb{R}$$ Prove that $$f$$ is constant.

My initial thought is to show that this function is entire, using Schwarz reflection principle (which I'm not too familiar with), and then show that is is in fact bounded, to use Liouville's theorem to conclude that $$f$$ is constant. But I'm not sure how to get a grip on this problem.

Your idea is correct: You start by defining the extended function $$\tilde{f}:\mathbb{C}\to \mathbb{C},\quad \tilde{f}(z):=\begin{cases} f(z) & z\in\overline{\mathbb{H}}\\ \overline{f(z)} & z\in \mathbb{C}\setminus \overline{\mathbb{H}} \end{cases}.$$ By the Schwarz reflection principle this function is holomorphic on the whole of $$\mathbb{C}$$, i.e. entire.
But this entire function again satisfies $$\Re(\tilde{f})\ge 0$$. Now the function $$z\mapsto e^{-\tilde{f}(z)}$$ is again entire and is bounded, as $$|e^{-\tilde{f}(z)}|=|e^{-\Re(\tilde{f}(z))}|\leq 1.$$ Thus by Liouville $$e^{-\tilde{f}(z)}$$ is constant. But this implies that $$\tilde{f}(z)$$ is constant and hence $$f$$ itself is constant.