Answer
$g\left(\displaystyle \frac{3}{q}\right)= \displaystyle \frac{9-6q+5q^{2}}{q^{2}}$
Work Step by Step
$g\left(\displaystyle \frac{3}{q}\right)$=... substitute x with $\displaystyle \frac{3}{q}$ and simplify
$=\left(\displaystyle \frac{3}{q}\right)^{2}-2\left(\displaystyle \frac{3}{q}\right)+5$
$=\displaystyle \frac{9}{q^{2}}-\frac{6}{q}+5\qquad$... common denominator: $q^{2}$
$= \displaystyle \frac{9-6q+5q^{2}}{q^{2}}$