You don't have a projection to $\mathbf{P}^1$. You have to "construct" one. The fact that $2$ is not a gap number for $P$ means that there is a rational function $f$ such that the divisor of poles $(f)_{\infty}$ equals $2\cdot P$. Consider the morphism $\overline{f}:X\to \mathbf{P}^1$ given by this rational function $f$. It is of degree $2$ (because $\deg \overline{f} = \deg (f)_{\infty} = \deg (f)_{0}$). So you have a hyperelliptic map on $X$. Moreover, you clearly see that $P$ is a ramification point because it has multiplicity two in the divisor of $f$.
So this proves that if $2$ is not a gap number for $P$, then $X$ has a hyperelliptic map for which $P$ is ramification points.
Let us prove the other implication. It is just as easy.
Now, suppose that $X$ is hyperelliptic and let $P$ be a ramification point. This means that there is a finite morphism $\pi:X\to \mathbf{P}^1$ of degree $2$ such that $P$ ramifies. Now, we may and do assume that $P$ maps to $\infty$. In fact, composing with an automorphism that sends $\pi(P)$ to $\infty$ will do the trick. Now, consider the divisor of poles of $\pi$. This is the divisor $(f)_{\infty} = 2\cdot [P]$. In fact, we already know that $P$ is in the support of $(f)_{\infty}$ because $P$ maps to $\infty$ and we also know that $P$ ramifies. So it must have multiplicity 2. So we see that there is a meromorphic function $f$ on $X$ such that $(f)_{\infty} =2 [P]$. But this means precisely that $2$ is not a gap number of $P$.
You can show that, if $X$ is hyperelliptic of genus $g\geq 2$, the hyperelliptic map $X\to \mathbf{P}^1$ has precisely $2g+2$ ramification points, and for each ramification point $P$, the gap-sequence $\Gamma(P)$ at $P$ equals $$\{1,3,5,\ldots,2g-1\}.$$ Hence, each $P$ has weight $g(g-1)/2$, and the ramification points are exactly the Weierstrass points of $X$.
The rational differential form $\omega$ on $X$ is just $dx/h(x)$ (but $x$ is viewed as a rational function on $X$).
Suppose the ground field is algebraically closed and of characteristic $\ne 2$.
At finite distance ($x\ne \infty$), at any point $p=(a,b)$, $x-a$ is a local parameter if $h(a)\ne 0$, in which case $\mathrm{ord}_p(\omega)=0$. If $h(a)=0$, then a parameter is $y$. As $h'(x)dx=2ydy$, we have $\mathrm{ord}_p(dx)=1$ and $\mathrm{ord}_p(h(x))=\mathrm{ord}_p(y^2)=2$. So $\mathrm{ord}_p(\omega)=-1$.
At $x=\infty$, first suppose $\deg h(x)=2g+2$ is even. Then $X\to\mathbb P^1$ is unramified above $x=\infty$, so $1/x$ is a parameter at the points $p_{\infty, 1}, p_{\infty, 2}$ above $\infty$, thus $dx$ has order $-2$ and $\omega$ has order $\deg h(x)-2=2g$ at $p_{\infty, i}$.
If $\deg h(x)=2g+1$, then the parameter at the unique point $p_\infty$ above $x=\infty$ is $y/x^{g+1}$, $1/x$ has order $2$ and $d(1/x)$ has order $1$. Thus $dx=-(1/x)^{-2}d(1/x)$ has order $-3$ and $\omega$ has order $2\deg h(x)-3=4g-1$.
In summary, let $p_1, \dots, p_{d}$ be the ramification points at finite distance ($d=\deg h(x)$), then
$$\mathrm{div}(\omega)=-p_1-\cdots- p_{2g+2} + 2gp_{\infty,1}+2gp_{\infty,2}$$
if $\deg h(x)$ is even, and
$$\mathrm{div}(\omega)=-p_1-\cdots- p_{2g+1} + (4g-1)p_{\infty}$$
otherwise.
Best Answer
You are right about how Miranda is extending the map $x$ to $Y$, but I don't think this is explicitly mentioned anywhere; it's implicitly implied by an extension of the isomorphism $(x,y)\mapsto (1/x,y/x^{g+1})$.
When the degree is odd, so that $h(x)$ is a polynomial of degree $2g+1$, then $k(z) = z^{2g+2}h(1/z)$ has $z=0$ as a root. This means that $(0,0)$ is the only point of $Y\setminus V$ and since $(0,0)\mapsto \infty$ under $x$, we will have a branch point at $\infty$. On the other hand, if $h(x)$ was of degree $2g+2$, then $k(z)$ wouldn't have $z=0$ as a root, so that $Y\setminus V$ would be two distinct points $(0,\sqrt{k(z)})$ and $(0,-\sqrt{k(z)})$, preventing $\infty$ from being a branch point.