Divide by x−1 first: corner 1, top row 1,−2,−5,6 gives bottom row 1,−1,−6 with remainder 0, so P(x)=(x−1)(x2−x−6).
x2−x−6=(x−3)(x+2)
Dividing the quotient by x−3 (corner 3, row 1,−1,−6, bottom 1,2,0) confirms the second exact division and leaves x+2. Altogether P(x)=(x−1)(x−3)(x+2), and expanding this product restores x3−2x2−5x+6.