Just factorization and case-working makes a perfect solution. For a hint, let $\sqrt{p}+2\sqrt{q} =k$