By the polynomial remainder theorem, if [tex]3x^3-x^2+px+1[/tex] is divisible by [tex]x-1[/tex], then the remainder is 0 and
[tex]3\cdot1^3-1^2+p\cdot1+1=p+3=0\implies\boxed{p=-3}[/tex]
Now,
[tex]3x^3-x^2-3x+1=x^2(3x-1)-(3x-1)=(x^2-1)(3x-1)=\boxed{(x-1)(x+1)(3x-1)}[/tex]