Proof (valuation of rational function)
Consider the ideal $$ \begin{align*} I = \bigcap_{n\geq 0} \mathfrak{m}_P^n \end{align*} $$ in the local ring $O_{C,P}$. Note $$I = \mathfrak{m}_P I,$$ so by Nakayama ($R = O_{C,P}$, $M = I$, $J = \mathfrak{m}_P$) and the fact $\mathfrak{m}_P$ is the unique maximal ideal in $O_{C,P}$, we have $I = 0$. We need to show $I$ is a finitely generated ideal of $O_{C,P}$. Indeed, any element $f/g\in I$ is a product of a unit $1/g\in O_{C,P}$ and some $f\in I$, so $I = (I\cap k[x_0, \ldots, x_n]) O_{C,P}$. $k[x_0, \ldots, x_n]$ is Noetherian (by the Hilbert basis theorem) so $I\cap k[x_0, \ldots, x_n]$ is a finitely generated, as claimed.
Therefore any $f\in O_{C,P}$ non-zero, there exists a unique $n\geq 0$ such that $f \in \mathfrak{m}_P^n \setminus \mathfrak{m}_P^{n+1}$. Set $ν_P(f) = n$. For any generator $π_P$ of $\mathfrak{m}_P/\mathfrak{m}_P^2$, notice $\mathfrak{m}_P^n/\mathfrak{m}_P^{n+1}$ is generated by $π_P^n$, so $$ \begin{align*} f = u \cdot π_P^n \end{align*} $$ where $u = f/π_P^n \in O_{C,P} \setminus \mathfrak{m}_P$ is a unit.
Furthermore define $ν_P(f/g) = ν_P(f) - ν_P(g)$, where $f/g\in k(X)$ and $f,g\in O_{C,P}$. Check this is well-defined.
The claims about $O_{C,P}$ and $\mathfrak{m}_P$ follow from definition.
For the ultrametric inequality, suppose $f = u π_p^n$ and $g = vπ_p^m$ and $u$ and $v$ are units. WLOG say $m\leq n$. Then $$ \begin{align*} f + g = π_p^{m}(uπ^{n-m} + v). \end{align*} $$ If $n>m$, then $uπ_p^{n-m} + v$ is a unit, so $ν_p(f + g) = m$. Otherwise, $uπ_p^{n-m} + v \in O_p$, so $ν_p(f+g) \geq m$.