Let us work over a fixed algebraically closed field $k$ and consider a non-singular projective curve $X$ and $\varphi : X \to \Bbb{P}^1$ a non-constant morphism.
My question is: For $P \in X$, do we have an isomorphism $$\mathcal{O}_{P,X} \cong \mathcal{O}_{\varphi(P),\Bbb{P}^1}?$$
The reason I ask this question is because I want to prove that $\varphi$ is surjective. I believe I have almost done this, and this is the last part in the proof that I basically need. Now I have determined that $\varphi$ is actually a dominant morphism (by topological considerations and using that the cardinality of $X$ is necessarily infinite). So actually I already know that
$$\varphi_P^\ast : \mathcal{O}_{\varphi(P),\Bbb{P}^1} \to \mathcal{O}_{P,X}$$
is injective. How can I prove that it has to be surjective? Do I know that $\mathcal{O}_{P,X}$ is finitely generated (as a module) over the image of $\mathcal{O}_{\varphi(P),\Bbb{P}^1}$?