Find all positive values for k for which each of the following can be factored.

I have 2 problems i think i got the one right but not sure the second one i have no idea where to even start

2x^3+16x^2-40x=2x(x^2+8x-20)
(x-2)(x+10)=8x

this one i am stumped
can some one explain to me how i do this
x^2+x-k

Well, the first one is odd. In the first line, it is correct. Then, the final factor should be:
2x(x-2)(x+10)
I don't know where you got 8x.

The second. Find all positive values of k....
x^2+x-k

Looking at the quadratic equation, the serd b^2-4ac, leads to 1+4k. For the square root of this to be real,
1+4k>=0
or k>=-1/4 however, k has to be a positive number, so k>0 leads to solutions. Any value of k >0 lets it be factorable.

Here is a comment by a great tutor to me:

Like you said, the discriminant is 1+4k

However, for a polynomial to be “factored” it is generally agreed that the factors are to contain rational numbers.

For that to happen the 1+4k must be a perfect square

Values of k which would work are 2,6,12,20,30,42,….we are really just looking for a number that has factors that differ by one.

This sequence can be obtained by the quadratic n^2 + n , where n is a set of the natural numbers.

e.g. if n=57, then k=57^2 + 57 = 3306

x^2 + x – 3306

=(x+58)(x-57)