I am trying to understand this example on the use of divisor of a curve:
Let $C$ be the projective plane curve with homogeneous equation $Y^2Z=X^3$. Let $x=X/Z$ and $y=Y/Z$ . Then one has $k(C)=k(x, y)/(y^2-x^3)$, and $div_C(x)=2[P]-2[\infty]$ and $div_C(y)=3[P]-3[\infty]$, where $P$ is the point $(0,0,1)\in C$ and $\infty =(0,1,0)$. If $U$ denotes the plane curve $C\setminus\{\infty\}$, then $div_U(x) = 2[P]$ and $div_U(y) = 3[P]$.
Can anybody help me understand why $div_C(x)=2[P]-2[\infty]$ and $div_C(y)=3[P]-3[\infty]$, where $P$ is the point $(0,0,1)\in C$ and $\infty =(0,1,0)$?