# Order of point in divisor

Let $y^2=f(x)$ be hyperelliptic curve over $k$ and $(a,\sqrt{f(a)})$ point on the curve and let $b\in k$. I would like to prove that divisor of the function $g(x,y)=\frac{x-b}{x-a}$ is equal to

$$div(g)=(b,\sqrt{f(b)})+(b,-\sqrt{f(b)})-(a,\sqrt{f(a)})-(a,-\sqrt{f(a)}).$$

It is easy to show that first two points are the only zero points and other two are the only poles, we also have point in infinity $(0:1:0)$ but $g$ has value not equal to $0$ in that point so order of point of infinity is $0$ and is not in divisor.

I can also show that, for example, the uniformizer in $P=(b,\sqrt{f(b)})$ is $y-\sqrt{f(b)}$ bu I don't know how to use it to show that order of that point is $1$. I also know that $ord_P(g)=ord_P(x-b)+ord_p(x-a)=ord_P(x-b)$ since $x-a$ doesn't vanish in $P$. If my curve was $\mathbb{P}^2$ I know I could conclude it is $1$ since it is zero point with multiplicity $1$? But what can I conclude here?

EDIT: I forgot to write that $(a,\sqrt{f(a)})$ is the point on curve in field $k$ and that could maybe help for some ideas?