Here is a direct proof a bit different from the standard proof of the Rational Root Test.
Theorem $\,\ $ If $\rm\,\ r^2 =\, \color{#0A0}{p\, r + q}\ \,$ for $\rm\ p,\,q\in\mathbb Z\ $ then $\rm\ r\in \mathbb Q\ \Rightarrow\ r\in\mathbb Z$
Proof $\ \ \ \rm \color{blue}{r\, =\, a/b}\in \mathbb Q,\ \, \gcd(a,b) = 1\ \Rightarrow\ ad\!-\!bc \;=\; \color{#C00}{\bf 1}\;$ for some $\:\rm c,d \in \mathbb{Z}\;\;$ by Bezout.
So $\rm\,\ 0\, =\, (\color{blue}{a - br})\: (c\!+\!dr) \, =\, ac\! -\! bd(\color{#0A0}{p\,r + q})+\color{#C00}{\bf 1}\cdot r \, =\, ac\!-\!adp\!-\!bdq + r \ \Rightarrow\ r \in \mathbb{Z}\ \ $ QED
Remark $\ $ This degree reduction generalizes to higher degree. If $\rm\ r = a/b \in \mathbb Q\ $ is the root of a monic polynomial $\in \mathbb Z[x]\:$ of degree $> 1$ then we can construct a lower degree monic polynomial having $\rm\:r\:$ as root - precisely as we did above. This degree reduction implies that we can prove irrationality of cube roots from the irrationality of square roots - something not well-known.