Step 1: Use the relationships between the roots and coefficients.
Let the roots of the quadratic equation be \( \alpha \) and \( \beta \). The A.M. (Arithmetic Mean) and G.M. (Geometric Mean) are given by:
\[
A.M. = \frac{\alpha + \beta}{2} = p, \quad G.M. = \sqrt{\alpha \beta} = q
\]
Step 2: Set up the equation using these relationships.
From the A.M., we have \( \alpha + \beta = 2p \), and from the G.M., we have \( \alpha \beta = q^2 \).
The equation of the quadratic is:
\[
x^2 - (\alpha + \beta)x + \alpha \beta = 0
\]
Substitute \( \alpha + \beta = 2p \) and \( \alpha \beta = q^2 \):
\[
x^2 - 2px + q^2 = 0
\]
Step 3: Conclusion.
The equation is \( x^2 - 2px + q^2 = 0 \).