Ans: C
$\begin{array}{rcl}
x^2 + p & \equiv & (x+2)(x+q)+10 \\
x^2 + p & \equiv & x^2 +(2+q)x +(2q+10)
\end{array}$
$\begin{array}{rcl}
x^2 + p & \equiv & (x+2)(x+q)+10 \\
x^2 + p & \equiv & x^2 +(2+q)x +(2q+10)
\end{array}$
By comparing the coefficients of both sides, we have
$\begin{array}{rcl}
0 & = & 2+q \\
q & = & -2
\end{array}$
Also,
$\begin{array}{rcl}
p & = & 2q + 10 \\
& = & 2(-2) + 10 \\
& = & 6
\end{array}$