Concept:
If two quadratic polynomials have a common factor, they share a common root.
Let the common root be:
\[
\alpha
\]
Then:
\[
\alpha^2+5\alpha+p=0
\]
\[
\alpha^2+3\alpha+q=0
\]
Step 1: Subtract the equations.
\[
(\alpha^2+5\alpha+p)-(\alpha^2+3\alpha+q)=0
\]
\[
2\alpha+p-q=0
\]
\[
\alpha=\frac{q-p}{2}
\]
Step 2: Substitute into one equation.
Using:
\[
\alpha^2+3\alpha+q=0
\]
Substitute:
\[
\left(\frac{q-p}{2}\right)^2+3\left(\frac{q-p}{2}\right)+q=0
\]
Multiply by \(4\):
\[
(q-p)^2+6(q-p)+4q=0
\]
Rearrange:
\[
(p-q)^2=6p-10q
\]
Factor out \(2\):
\[
(p-q)^2=2(3p-5q)
\]
Thus, the required answer is:
\[
\boxed{2(3p-5q)}
\]