System of Diophantine Equations I'm working on this problem I came across on the internet but I have no solution yet. 
The problem states: Find all prime numbers p that are such that  $p+1=2x^2$ and $p^2+1=2y^2$ where x and y are integers.
Edit: to which point I have reached.
 I wrote $p=2p_1+1$. After this the second equation becomes $2p_1^2+2p_1+1=y^2$ which is rewritten as $p_1^2+x^4=y^2$ in which we only have to find Pythagorean triples. 
 A: Suppose wlog $x,y >0$
Substract initially the two equations to get $p(p-1)=2(y-x)(y+x)$
If $p \mid (y-x) \Rightarrow p \leq y-x \Rightarrow p-1 \geq 2(y+x)$ so we can see that $y-x > 2(y+x) \Rightarrow y+3x<0$ contradiction.  
Therefore $p \mid (x+y) \Rightarrow p\leq x+y \Rightarrow p-1\geq 2(y-x)$ so $x+y \geq 2(y-x) \Rightarrow y<3x \Rightarrow y^2<9x^2 \Rightarrow p^2+1<9(p+1)$   
We now just have to solve $p^2-9p-8<0 $ from which we deduce that $p<10$ and by checking possible values we get $p=7$.
A: 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.
A: $$p+1=2x^2,p^2+1=2y^2\\
2y^2-1=(2x^2-1)^2\\
y^2=2x^4-2x^2+1\\
y^2=2x^2 (x-1)(x+1)+1$$
Suppose $y=2m+1,$ then $$y^2=4m(m+1)+1.$$
Hence 
$$2m(m+1)=x^2 (x-1)(x+1).$$
$$\dfrac{m(m+1)}{2}=\dfrac{x(x-1)}{2}\times\dfrac{x(x+1)}{2}$$
I have no idea to continue this. But I think find the pairs triangle numbers who can satisfy the equation $$\color{Green}{T_m=T_{x-1}T_x}$$ would be a help to solve tyhis problem.
