The roots of a polynomial are, in a certain sense, the blocks to build the polynomial itself.

Take for example an expression like #f(x)=(x-\alpha)#, for some real number #\alpha#. This is a line (first degree polynomial) which equals zero exacly when #x=\alpha#, since #f(\alpha) = \alpha-\alpha=0#.

To build a polynomial with higher degree, simply multiply such blocks: if we consider #g(x) = (x-\alpha)(x-\beta)#, this function will have exactly #\alpha# and #\beta# as roots, since now we have

#g(\alpha) = (\alpha-\alpha)(\alpha-\beta) = 0*(\alpha-\beta) = 0#

#g(\beta) = (\beta-\alpha)(beta-\beta) = (\beta-\alpha)*0 = 0#

In this way, you can build a polynomial of the degree you want, with the roots that you want. In your case, you have to build

#p(x) = (x-1)(x+8)#

In fact,

#p(1) = (1-1)(1+8) = 0*9 = 0#

#p(-8) = (-8-1)(-8+8) = -9*0 = 0#

So, #p(x)# has the roots we want it to have. To write it in standard form, simply expand the parenthesis:

#(x-1)(x+8) = x^2+7x-8#

**Faster Strategy:**

In the particular case of quadratic polynomials, we have a faster way to solve exercises like this: the generic expression

#x^2+ax+b# (note that the #x^2# coefficient must be #1#)

yields two solutions #x_1# and #x_2# such that

#x_1+x_2 = -a#

#x_1x_2 = b#

In other words, the sum of the solutions is the opposite of the #x# coefficient, and the product of the solutions is the last coefficient of the quadratic expression.

If your solutions have to be #1# and #-8#, then we have

#a=-(1-8) = 7#

#b = 1*(-8) = -8#

and again we come to the conclusion that

#p(x) = x^2+7x-8#