$\text {a,}$
`(x-1)(n+7)-x^2+3x`
`= xn+7x-n-7-x^2+3x`
`= -x^2+10x-n+xn-7`
$\text {a,}$
$\text {→Có thể bạn nhầm đề nên mình làm thêm trường hợp này:}$
`(x-1)(x+7)-x^2+3x`
`= x^2+7x-x-7-x^2+3x`
`= 9x-7`
$\text {b,}$
`2x-10+(x-5)(x+4)`
`= 2x-10+x^2+4x-5x-20`
`= x^2+x-30`
$\text {c,}$
`3x^2-(3x-1)(x+2)`
`= 3x^2-3x^2-6x+x+2`
`= -5x+2`
$\text {d,}$
`(x-2)(x-3)-(x+1)(x-6)`
`= x^2-3x-2x+6-x^2+6x-x+6`
`=12`
$\text {@lamtung2007}$