a) \(xy+3x-7y-21\)
\(\Leftrightarrow\left(xy+3x\right)-\left(7y+21\right)\)
\(\Leftrightarrow x\left(y+3\right)-7\left(y+3\right)\)
\(\Leftrightarrow\left(x-7\right)\left(y+3\right)\)
b) \(2xy-15-6x+5y\)
\(\Leftrightarrow\left(2xy-6x\right)-\left(15-5y\right)\)
\(\Leftrightarrow x\left(2y-6\right)-5\left(3-y\right)\)
\(\Leftrightarrow2x\left(y-3\right)+5\left(y-3\right)\)
\(\Leftrightarrow\left(2x+5\right)\left(y-3\right)\)