1:
Ta có: \(B=2x+xy^2-x^2y-2y\)
\(=\left(2x-2y\right)+\left(xy^2-x^2y\right)\)
\(=2\left(x-y\right)+xy\left(y-x\right)\)
\(=\left(x-y\right)\left(2-xy\right)\)
2:
Ta có: \(C=xy-4y-5x+20\)
\(=\left(xy-4y\right)-\left(5x-20\right)\)
\(=y\left(x-4\right)-5\left(x-4\right)\)
\(=\left(x-4\right)\left(y-5\right)\)