Pick $x \in X,$ and say $y = f(x).$ Let $(\phi, U)$ be a chart at $x$ in $X$ and $(\psi, V)$ a chart at $y$ in $Y.$ Then, since $f$ is holomorphic, we know that $\psi \circ f \circ \phi^{-1}$ holomorphic in the typical sense, since it's domain and codomain are both open subsets of $\mathbb{C}.$ Hence, it's inverse $\phi \circ f^{-1} \circ \psi^{-1}$ is holomorphic, by standard complex analysis in the plane (since it is a composition of bijections, it is still invertible). But then, by definition of holomorphic functions on Riemann surfaces, $f^{-1}$ will be holomorphic at $y.$ Repeat for every $x \in X$ and you find $f^{-1}$ is holomorphic on all of $Y.$