Evidently Legendre showed that, for positive primes, if $p \equiv 3 \pmod 8$ there is an integral solution to $x^2 - p y^2 = -2.$ Next, if $q \equiv 7 \pmod 8$ there is an integral solution to $x^2 -q y^2 = 2.$
What I would like, and seems to be true, is $x^2 - 2 p y^2 = -2$ for $p \equiv 3 \pmod 8,$ and $x^2 - 2 q y^2 = 2$ for $q \equiv 7 \pmod 8.$ It is probably in Mordell's book, which I do not have here.
Mordell does $x^2 - r y^2 = -1$ for any prime $r \equiv 1 \pmod 4,$ I do remember that. Anyway, I am writing up something and this issue came up.
P.S. Note these are the same as $2x^2 - p y^2 = -1$ if $p \equiv 3 \pmod 8,$ while if $q \equiv 7 \pmod 8$ there is $2x^2 -q y^2 = 1.$