Ok so 3x-40=-120 and the middle number is -7 so the two numbers will have to multiply to -120 and add to - so those numbers would be 15 and-8 so then we will factor by parts so 3p^2+15p-8p-40 then section into brackets (3p^2+15p)(-8p-40) out of the first bracket you can factor out 3p and on the second bracket you can factor out -8 so you are left with 3p(p+5)-8(p+5) the combine 3p and -8 so (3p-8)(p+5)