# How to deal with a Pell's equation type problem with two primes

I have some understanding of Pell's equation $$x^2-dy^2=1$$ where $d$ is a prime. I know that you can take the continued fraction of $\sqrt{d}$ and use information about the period and convergents to find things out. Now I need to show that if $p,q$ are primes $\equiv 3 \pmod{4}$ then at least one of the equations $$px^2-qy^2=\pm 1$$ is soluble in integers $x,y$. I have not learned what to do when there is a prime in front of the $x^2$. How should I begin doing this?

You have a primitive solution to $x^2-pqy^2=1$ ($x$, $y$ positive, $y$ minimal). Then $x$ is odd and $y$ is even (think modulo $4$). Also $$x^2-1=(x+1)(x-1)=pqy^2$$ so that $$\frac{x+1}2\frac{x-1}2=pq\left(\frac{y}{2}\right)^2.$$ As $(x\pm 1)/2$ are coprime integers then we have one of the following
1. $(x+1)/2=u^2$, $(x-1)/2=pqv^2$
2. $(x+1)/2=pu^2$, $(x-1)/2=qv^2$
3. $(x+1)/2=qu^2$, $(x-1)/2=pv^2$
4. $(x+1)/2=pqu^2$, $(x-1)/2=v^2$
We succeed with (2) and (3) (write $1=(x+1)/2-(x-1)/2$). We eliminate (1) by minimality to solution of Pell and (4) gives $v^2-pqu^2=-1$ which is impossible modulo $p$.