(a) As $u - v$ is constant $\partial u/\partial x = \partial v/\partial x$ and $\partial u/\partial y = \partial v/\partial y$. As the Cauchy-Riemann equations also hold, it's easily deduced that all the partial derivatives are zero, which implies that $f$ is constant.

Can you now make progress with (b) by using the hint provided?