This polynomial factors, and that can be seen using the grouping method. If your polynomial has four terms like this one, the grouping method might work. You group terms together two at a time and factor out a Greatest Common Factor:
$ \begin{align*} x^3-3x^2+x -3 & = x^2(x-3)+1(x -3)\\ & = (x^2+1)(x-3) \end{align*} $
And voila, the polynomial is at least partially factored. Over $\mathbb{R}$, we cannot factor further, since $-1$ has no square root.
Next, now that we have exhausted factoring over $\mathbb{R}$, maybe factoring can continue over $\mathbb{F}_5$. Indeed, here we have $ \begin{align*} x^3-3x^2+x -3 & = x^2(x-3)+1(x -3)\\ & = (x^2+1)(x-3)\\ & = (x^2-4)(x-3)\\ & = (x-2)(x+2)(x-3) \end{align*} $
Lastly, it's nice to choose residues from the same neighborhood, so $ \begin{align*} x^3-3x^2+x -3 & = x^2(x-3)+1(x -3)\\ & = (x^2+1)(x-3)\\ & = (x^2-4)(x-3)\\ & = (x-2)(x+2)(x-3)\\ & = (x-2)(x-3)(x-3)\\ & = (x-2)(x-3)^2 \end{align*} $