we have
x^2+2x-8
Complete the squares
x^2+2x-8=0
x^2+2x=8
(x^2+2x+1)=8+1
x^2+2x+1=9
Rewrite as pefect squares
(x+1)^2=9
take the square root both sides
(x+1)=(+/-)3
x=-1(+/-)3
the values of x are
x=2 and x=-4
therefore
x^2+2x-8=(x-2)(x+4)
the possible dimensions of the paint are
(x-2) and (x+4)