\(xyz+xz+yz-z+xy+x-y-1\)
\(=\left(xyz+xz+yz-z\right)+\left(xy+x-y-1\right)\)
\(=z\left(xy+x-y-1\right)+\left(xy+x-y-1\right)\)
\(=\left(z+1\right)\left(xy+x-y-1\right)\)
Thay x=-9, y=-21 và x=-31 vào ta có:
\(=\left(-31+1\right)\cdot\left\{\left[-9\cdot\left(-21\right)\right]+\left(-9\right)-\left(-21\right)-1\right\}\)
\(=-31\cdot\left(180+21-1\right)\)
\(=-30\cdot200\)
\(=-6000\)
\(B=xyz+xz-yz-z+xy+x-y-1\)
\(=\left(xyz+xz-yz-z\right)+\left(xy+x-y-1\right)\)
\(=z\left(xy+x-y-1\right)+\left(xy+x-y-1\right)\)
\(=\left(xy+x-y-1\right)\left(z+1\right)\)
Với \(x=-9;y=-21;z=-31\), ta được:
\(B=\left[-9\cdot\left(-21\right)-9-\left(-21\right)-1\right]\cdot\left(-31+1\right)\)
\(=200\cdot\left(-30\right)\)
\(=-6000\)