Let $a$ and $b$ be the roots of the equation $x^2-mx+2=0$. Suppose that $a+\frac1b$ and $b+\frac1a$ are the roots of the equation $x^2-px+q=0$. What is $q$?
$\textbf{(A) } \frac{5}{2}\qquad \textbf{(B) } \frac{7}{2}\qquad \textbf{(C) } 4\qquad \textbf{(D) } \frac{9}{2}\qquad \textbf{(E) } 8$
In a [quadratic equation](https://artofproblemsolving.com/wiki/index.php/Quadratic_equation) of the form $x^2 + bx + c = 0$, the product of the [roots](https://artofproblemsolving.com/wiki/index.php/Root) is $c$ ([Vieta's Formulas](https://artofproblemsolving.com/wiki/index.php/Vieta%27s_Formulas)).
Using this property, we have that $ab=2$ and
$q = (a+\frac{1}{b})\cdot(b+\frac{1}{a}) = \frac{ab+1}{b} \cdot \frac{ab+1}{a}  = \frac{(ab+1)^2}{ab} = \frac{(2+1)^2}{2} = \boxed{\textbf{(D) }\frac{9}{2}}$.

Notice the fact that we never actually found the roots.