The actual question:
$f(z)$ is holomorphic in some neighbourhood of $0$, $f(0) = 0$, $f'(0) =/= 0$. Suppose $f(z)$ maps the real axis to the imaginary axis and suppose it maps the imaginary axis to a line $l$. Prove that $l$ is the real axis using the Cauchy Riemann equations.
It suffices to show that $f$ maps imaginary values to real values in a neighbourhood of $0$ since we know that $l$ is a line. To do this, we can show that $v_y(z) = 0$ for all imaginary values in a nbhd of $0$ since we know that $v(0) = 0$ and $v_y(z) = 0$ for imaginary values implies that $v = 0$ everywhere on the imaginary axis.
Write $f = u + iv$. Then $f(x)$ is imaginary for real $x$, so $u(t) = 0$ for all real $t$. This implies $u_x(t) = 0$ as $u$ is constant with respect to moving along the real axis (always $0$). By Cauchy Riemann, in a neighbourhood of $0$, we have $u_x = v_y$, so $v_y(t) = 0$ too. How do I now get $v_y(z)$?