2x^2+3px+5q=0 differ by 2,find the value of p and q

If you mean the roots differ by 2, then

x = (-3p±√(9p^2-40q))/4
= -3/4 p ±√(9p^2-40q)/4
Thus,
√(9p^2-40q)/4 = -√(9p^2-40q)/4 + 2
√(9p^2-40q) = -√(9p^2-40q)/4 + 8
2√(9p^2-40q) = 8
√(9p^2-40q) = 4
9p^2 - 40q = 16
9p^2 = 8(5q+2)
Now we must have 5q+2 is a multiple of 9
So, if we let q=14,
9p^2 = 8*72 = 9*64
p = 8
check: 2x^2+24x+70 = 0
2(x+5)(x+7) = 0
The roots are -5 and -7, which differ by 2
Other solutions are also possible.