30. Solve the equation $p^{2}-6 p q+q^{2}+3 q-1=0$ in prime numbers.
30. Answer: $p=17, q=3$.

Let's look at the remainders when dividing by 3, we get $p^{2}+q^{2} \equiv 1(\bmod 3)$, this is only possible if one of the numbers is 3.

Let $q=3$, we get the quadratic equation: $p^{2}-18 p+17=0$. This gives us $p=1$ or 17. 1 is not a prime number, so $p=17$.

Let $p=3$, then $q^{2}-15 q+8=0$. The solutions to this equation are not integers, so they do not fit our criteria.