I recently had to skip a number theory lecture because I was sick, and they proved that the set
$$\mathcal{P}_d(\mathbb{Z})^+=\lbrace(x_0,y_0)\in\mathbb{Z}^2_{\geq1}:x_0^2-dy_0^2=1\rbrace\neq\varnothing$$ And that if $(a,b)\in\mathcal{P}_d(\mathbb{Z})^+$ then $\frac ab$ is a convergent for $\sqrt d$.
I tried proving those two statements but I just can't seem to get even near a proof, could someone cite a paper or show me a proof for both statements?