a) f(-2)=4-2p+q=3, so 2p-q=1. So f(x)=x²+px+2p-1.
The equation of the quadratic can be written y=(x-a)²+3, so it’s clear that the minimum value for y is when x=a. So y=x²-2ax+a²+3=x²+px+2p-1. And p=-2a and a²+3=2p-1, a²=2p-4. Substitute for a and we get:
p²/4-2p+4=0; p²-8p+16=0, (p-4)²=0, so p=4 and q=2p-1=7.
f(x)=x²+4x+7; f(-2)=4-8+7=3, so that fits the requirements.

b) x²+(3k-7)x+2k+6=0.
Complete the square: x²+(3k-7)x+(3k-7)²/4+2k+6=(3k-7)²/4.
(x+(3k-7)/2)²=-2k-6+(3k-7)²/4=
(-8k-24+9k²-42k+49)/4=(9k²-50k+25)/4=
(9k-5)(k-5)/4.
(9k-5)(k-5)/4≥0 for real roots. So k≥5 or k≤5/9 satisfies this condition.