The general solution to diophantine equations using pythogorean triples is:
$$x^2 + y^2 = z^2$$
And
$$(x, y, z) = (2rs, r^2 -s^2, r^2 +s^2)$$
You can use this to find $p_1$ and $p$
EDIT
Notice actually that in the second equation we can rewrite to get:
$$\large p^2 - 2y^2 = -1$$
This is an example of a Pell Equation, where $D = 2$
You can use the continued fraction expression for the $\sqrt{2}$ to find a fundamental solution:
$$\large \sqrt{2} = 1 + \frac{1}{2+\frac{1}{2+\frac{1}{2 +...}}}$$
And so the convergents are:
$$\frac{1}{1}, \frac{3}{2}, \frac{7}{5}, \frac{17}{12}, ...$$
From the convergents, we can see that the first solution is when $p = 7$, and $y = 5$ (the first solution is technically, $(1,1)$, but $1$ isn't prime).
By evaluating the convergents, we can see that the 1st, 3rd, 5th, etc. are solutions to the Pell Equation.
You can more about it here
hope this helped.