I'm reading Fulton's algebraic curves book and I didn't understand why divisors of $z \in K$ are well-defined (page 97):

The problem he mentioned:

I didn't understand why solving this problem we have the well-definiteness of $div(z)$.
I really need help!
Thanks