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