Show that if $f$ is analytic on a domain D and if the range of $f$ lies in either a straight line or a circle, then $f$ is constant.
Here is the method the book used for the straight line. Suppose the range of $f$ lies in the straight line Re$(Aw+B)=0$. Then $g(z)= Af(z)+B$ is analytic, and Re $g=0$. Hence $g$ is constant, and therefore so is $f$.
I'm not sure how to use this method for the circle. If the range is a circle then we have $u^2+v^2 = r$ but how do we know that $f$ is constant?
Restrict the domain $\Omega$ of $f$ such that $U:=f(\Omega)$ covers at most half of the circle. Choose a point $c\notin U$ on the circle and consider the Möbius transformation $$T(w):={1\over z-c}\ .$$ This $T$ is analytic on $U$ and maps the circle onto a "circle" through $\infty$, i.e., a line. Argue now about the function $$g(z):=T\bigl(f(z)\bigr)\ .$$