When the leading coefficient is 1, you can think of a quadratic equation as
[tex]x^2-sx+p[/tex]
i.e. the linear coefficient is the opposite of the sum of the roots, and the constant term is the product of the roots.
So, we're looking for two numbers that given -21 when multiplied and 4 when summed.
Since you can obtain -21 only by multiplying -3 and 7 or 3 and -7, fixing the sum to be 4 means that the solutions are -3 and 7.