№1
a)(a+3)(b-7)=ab-7a+3b-21
б)(x+2)(x^2-x-3)=x^3-x^2-3x+2x^2-2x-6=x^3-x^2-5x-6
в)(3x^2-1)(2x+1)=6x^3+3x^2-2x-1
г)-4(y-1)(y+5)=(-4y+4)(y+5)=-4y^2-20+4y+20=-4y^2+4y
№2
а) 8p-(3p+8)(2p-5)=8p-(6p^2-15p+16p-40)=8p-6p^2-p+40=7p-6p^2+40
б) 5y^2-(3y-1)(5y-2)=5y^2-(15y^2-6y-5y+2)=5y^2-15y^2+11y-2=-10y^2+11y-2