Step 1: Find the value of \( p \).
The given quadratic equation is:
\[
x^2 + px + 12 = 0.
\]
Since one root is given as \( x = 4 \), substituting it into the equation:
\[
4^2 + 4p + 12 = 0.
\]
\[
16 + 4p + 12 = 0.
\]
\[
4p + 28 = 0.
\]
\[
4p = -28.
\]
\[
p = -7.
\]
Step 2: Use the condition for equal roots in the second equation.
The second equation given is:
\[
x^2 + px + q = 0.
\]
For equal roots, the discriminant must be zero:
\[
\Delta = p^2 - 4q = 0.
\]
Substituting \( p = -7 \):
\[
(-7)^2 - 4q = 0.
\]
\[
49 - 4q = 0.
\]
\[
4q = 49.
\]
\[
q = \frac{49}{4}.
\]
Thus, the correct answer is \( \frac{49}{4} \).