Finding rational $p$ and $q$ that satisfy $(p+3\sqrt 7)(5+q\sqrt 7)=9\sqrt 7-53$ 
How do I find rational $p$ and $q$ that satisfy this equation?
$$(p+3\sqrt 7)(5+q\sqrt 7)=9\sqrt 7-53$$

The equation is equal to:
$$5p+15\sqrt 7+pq\sqrt 7+3q\sqrt 7=9\sqrt 7-53$$
What can I do next to find what $p$ and $q$ are equal to?
I know that since there are three $\sqrt 7$'s here, and I know that they have something to do with the answer; so, what can I do next to find out the values of $p$ and $q$?
 A: $5p+15\sqrt7+pq\sqrt7+3q\sqrt7=9\sqrt7-53$$\Rightarrow$$\sqrt7(15+pq+3q)+5p=9\sqrt7-53$Two irrational numbers are equal iff their rational and irrational parts are equal.$\Rightarrow$ $$5p+21q=-53 \;and\; 15+pq+3q=9$$On solving these equations, we get $p=-10.6 \;and\; q=0.789$
A: First, as mattos mentioned in a comment, your last equation should look like
$$5p + 15\sqrt7 + pq\sqrt7 + 3q\sqrt7^2 = 9\sqrt7 - 53$$
which simplifies to
$$(5p + 21q + 53) + (pq + 6)\sqrt7 = 0$$
Now you use the fact that two real numbers are equal if and only if their rational and irrational parts are equal. Since $p$ and $q$ are rational you must have
$$5p + 21q + 53 = 0, \; \; pq+ 6 = 0$$
You can solve this to get $p$ and $q$. There will be two pairs of solutions, in fact.

A: Whoa!  IMPORTANT  $(3\sqrt 7)\cdot (q\sqrt 7) = 3q\sqrt 7^2 = 3q\cdot 7=21q\ne 3q\sqrt 7$.
So we have $5p + 15 \sqrt 7 +pq \sqrt 7 + 21q = 9\sqrt 7 -53$
Now rewrite that as $(15+pq)\sqrt 7 + (5p+21a) = 9\sqrt 7 - 53$
The trick is that no matter how you add up the rational multiples of $\sqrt 7$ you will always get a a rational multiple of $7$ and no matter how you add up the rationals you get a rational and you can never "breakup" or mixup the rational multiples of $\sqrt 7$ and rationals.  (They are like oil and vinegar.)
So if $M\sqrt 7 + Q = A\sqrt 7 + B$ and $M,Q,A,B$ are all rational we must have $M=A$ and $Q = B$.

Pf:  Suppose $M\ne A$ then $M\sqrt 7 - A\sqrt 7 = B-Q$ then $\sqrt 7(M-A) = B-Q$ and $M-A \ne 0$ so $\sqrt 7 =\frac {B-Q}{M-A}\in \mathbb Q$ which is a contradiction.  So $M = A$ and so $M\sqrt 7 + Q = M\sqrt 7 + B$ so $Q=B$.

So we just have to solve $15 +pq  = 9$ and $5p+21q  = -53$.
$p = \frac {-53-21q}5$ and so
$15 - \frac {53+21q}5q = 9$
$75 - 53q -21q^2 = 45$
$21q^2 +53q -30 = 0$ so $q = \frac {-53 \pm \sqrt {53^2+4*30*21}}{42}=\frac {-53\pm 73}{42}= \frac {20}{21}$  or $-\frac {126}{42}=3$ and so
$p =\frac {-53 -20}5 = \frac {-73}5$ or $p=\frac {-53+63}5= 2$.
So $(p,q) =(\frac {-73}5,\frac {20}{21})$ or $(p,q) = (2,-3)$.
