Ta có: \(xy+3x-7y=21\)
\(\Rightarrow xy+3x-7y-21=0\)
\(\Rightarrow\left(xy+3x\right)-\left(7y+21\right)=0\)
\(\Rightarrow x\left(y+3\right)-7\left(y+3\right)=0\)
\(\Rightarrow\left(y+3\right)\left(x-7\right)=0\)
\(\Rightarrow\left[{}\begin{matrix}y+3=0\\x-7=0\end{matrix}\right.\Rightarrow\left[{}\begin{matrix}y=-3\left(tm\right)\\x=7\left(tm\right)\end{matrix}\right.\)
Vậy: \(x=7;y=-3\).