\(\left(x^2-3x+xy-3y\right):\left(x+y\right)\)
\(=\left[\left(x^2+xy\right)-\left(3x+3y\right)\right]:\left(x+y\right)\)
\(=\left[x\left(x+y\right)-3\left(x+y\right)\right]:\left(x+y\right)\)
\(=\left(x+y\right)\left(x-3\right):\left(x+y\right)\)
\(=x-3\)