Throughout we will work over $\mathbb{C}$.
Let $P$ be the point $P:=[0:1]$ and $D$ the Weil divisor $D:=nP$. What are the global sections of the sheaf $\mathcal{O}_{\mathbb{P^{1}}}(D)$?
I know that $$ \mathcal{O}_{\mathbb{P^{1}}}(D)(U)=\left\{\frac{f(x,y)}{g(x,y)}\ f,g \ \text{are homogenous of degree}\ d :\text{ord}_{p}(f)-\text{ord}_{p}(g)\geq -n\ \text{if}\ p\in U\right\}. $$
and answer should be homogenous degree $d$ polynomials, but I am unsure how to arrive at this.
Your definition of the sections is slightly incomplete: $f/g$ should have no poles on $U$ away from $p$. Therefore to calculate global sections, any factor of $g$ which is coprime to $x$ should be cancelled by a factor of $f$, so in lowest terms $\frac{f}{g}=\frac{p(x,y)}{x^a}$, where $a \leq n$. Up to multiplying this expression by $\frac{x^{n-a}}{x^{n-a}}$, we can therefore represent any global section of this sheaf as a homogeneous polynomial of degree $n$ divided by $x^n$, and there you go.