`a)3x-3a+yx-ya`
`=3(x-a)+y(x-a)`
`=(x-a)(y+3)`
`b)x^2-9-4(x+3)`
`=(x-3)(x+3)-4(x+3)`
`=(x+3)(x-3-4)`
`=(x+3)(x-7)`
a) \(=3x+yx-\left(3a+ya\right)\) \(=x\left(3+y\right)-a\left(3+y\right)\) \(=\left(3+y\right)\left(x-a\right)\)
b) \(=\left(x-3\right)\left(x+3\right)-4\left(x+3\right)\) \(=\left(x+3\right)\left(x-3-4\right)\) \(=\left(x+3\right)\left(x-7\right)\)