Let $f$ be a holomorphic map from the unit disc $\mathbb{D}$ to an open square $\mathbb{S}$ with its center at the origin. Given $$ f(0) = 0, \qquad f'(z) \neq 0 \quad (z \in \mathbb{D}) $$ prove that $$ if(z) = f(iz) \quad (z \in \mathbb{D}) $$
I see that $f^{-1}(if(z))$ is an automorphism of the disc and hence a rotation, but why does it have to be a rotation by $\frac{\pi}{2}$?
You have observed that $g(z)=f^{-1}(if(z))$ is a rotation, since it is an automorphism of the disk that fixes $0$. To find out what it is a rotation by, you can just compute the derivative at $0$ by the chain rule: $$g'(0)=i(f^{-1})'(0)f'(0)=i$$ since $(f^{-1})'(z)=1/f'(f^{-1}(z)).$