I'm trying to understand why this order defined in Fulton's algebraic curves book is indeed well-defined:

I have two questions:
Why $u\in \mathcal{O_P}(X)$ (he is implicitly assuming this fact so that he can use the preposition 7)
Why $f/g, g/f\in \mathcal{O}_P(X)\implies \text{ord}_P(f)=\text{ord}_P(g)$?
Thanks
The answer to your first question is explained right before proposition 7 of the preceding section.
For your second question, $f/g\in \mathcal O_p(X)$ means that $\operatorname{ord}_P(f/g)=\operatorname{ord}_P(f)-\operatorname{ord}_P(g)\geq 0$. Likewise, $\operatorname{ord}_P(g)-\operatorname{ord}_P(f)\geq 0$.