b) Ta có: \(x^2y+xy+x+1\)
\(=xy\left(x+1\right)+\left(x+1\right)\)
\(=\left(x+1\right)\left(xy+1\right)\)
c) Ta có: \(ax+by+ay+bx\)
\(=a\left(x+y\right)+b\left(x+y\right)\)
\(=\left(x+y\right)\left(a+b\right)\)
d) Ta có: \(x^2-\left(a+b\right)x+ab\)
\(=x^2-ax-bx+ab\)
\(=x\left(x-a\right)-b\left(x-a\right)\)
\(=\left(x-a\right)\left(x-b\right)\)