$1$. Does there exists an analytic function $f: \mathbb{C} \rightarrow \mathbb{C}$ such that $f(z)=z$ for all $|z|=1$ and $f(z)=z^2$ for all $|z|=2$.
$2$.There exists an analytic function $f: \mathbb{C} \rightarrow \mathbb{C}$ such that $f(0)=1,f(4i)=i$ and for all $z_j$ such that $1 < |z_j| < 3, j=1,2$ we have $|f(z_1)-f(z_2)| \leq |z_1-z_2|^{\frac{\pi}{3}}$
For $2$, I get that $f$ is constant on the annulus. Then by identity theorem, I can conclude that f cannot exist. Am I right?
I don't know how to proceed $1$
Your answer for second part is correct. The first part is much simpler: $f(z)-z$ is analytic on $\mathbb C$ and its zeros have a limit point. Hence $f(z)=z$ for all $z$.