a) \(2xy-y+6x-3=\left(2xy+6x\right)-\left(y+3\right)=2x\left(y+3\right)-\left(y+3\right)=\left(2x-1\right)\left(y+3\right)\)
b) \(x^2-2xy-x+2y=\left(x^2-2xy\right)-\left(x-2y\right)=x\left(x-2y\right)-\left(x-2y\right)=\left(x-1\right)\left(x-2y\right)\)