Question: Does there exist an analytic function mapping $A = \{z : 1 \le |z| \le 4\}$ onto $B = \{z : 1 \le |z| \le 2\}$ and taking $C_1 \to C_1$, $C_4 \to C_2$, where $C_r$ is the circle of radius $r$? Hint: consider $g(z) = f(z)^2/z$.
My attempt: On $C_1$, $|g(z)| = 1$, and on $C_4$, $|g(z)| = 1$. I would like to show that $g(z)$ is constant, then
$$f(z) = \sqrt{cz},$$
where $c = g(z)$. Because this function is not continuous on $A$, we would have a contradiction. But, I don't know how to conclude that $g$ is constant. I'm assume it's due to the max-mod principle, but I don't see how to bound $g$ within its domain to get the correct conclusion.
Both $g(z)=\frac{f(z)}{z^2}$ and $h(z)=\frac{z^2}{f(z)}$ are analytic on $A$ because $f$ is never zero. Moreover, $|g|=|h|=1$ on the boundary of $A$.
The maximum modulus principle applied to $g$ implies that $|g|\leq 1$ on $A$, and by the same reasoning $|h|\leq 1$ on $A$. Therefore $|g|\geq 1$ on $A$ since $h=\frac{1}{g}$, hence $|g|=1$ on $A$.
If $g$ is non-constant then it is an open mapping, but this is impossible because $|g(z)|=1$ for all $z\in A$. Therefore $g$ is constant.