If x=-2, x=3 both satisfy the equation x^2+px+q=0 find the values of p,q.

well, with those two roots,

f(x) = (x+2)(x-3)

so expand that and you can see what p and q must be.