解:(a+2)²+|a+b+5| =0.,(a+2)²=0,a=-2,|a+b+5|=0,将a=-2代入 |a+b+5|=0,b=-3.原式=3a²b-[2a²b-(2ab-a²b)-4a²] =3a²b-2a²b+2ab-a²b+4a² =4a²-2a²b =2a²(2-b) =2x(-2)²[2-(-3)] =40