Okay, so we know (x-1) is a factor of $$x^3+3x^2+x-5$$.
Let's say we want to find the c in $$x^3+3x^2+x-5 = (x-1)c$$
We want $$x^3$$ so we know some part of c is $$x^2$$
Let's write $$x^3 + 3x^2 + x -5 = (x-1)(x^2+....)$$
We now have $$x^3$$ but we also have $$-x^2$$ because $$(x-1)(x^2+...) = x^3 - x^2+...$$
We want $$3x^2$$ so let's add $$4x$$ which multiplies to $$4x^2$$ and $$4x^2-x^2 = 3x^2$$
Now we have $$(x-1)(x^2+4x + ..) = x^3+3x^2-4x+..$$
we want $$x$$ instead of $$-4x$$ so we add $$5$$ which multiplies to $$5x$$
Now we have $$(x-1)(x^2+4x+5) = x^3 -x^2 + 4x^2-4x + 5x - 5 = x^3 +3x^2+x-5$$
Which was what we were looking for.
$$x^2+4x+5$$ can't be further factorized so $$(x-1)(x^2+4x+5)$$ is the final answer
Reinout 