(8*2x+24-10x*2x-10x*3)-(40+4x-5x*10-5x*x)
=(16x+24-20x²-30x)-(40+4x-50x-5x²)
=-20x²-14x+24-40-4x+50x+5x²
=-20x²-14x-16+46x+5x²
=-15x²-32x-16