Now factor all terms (if possible!):
Cancel equal factors. I'll leave this part for you.
By the way: If you don't want to use LaTeX then your problem should have been written like this:
((x^3 + 1) /( X-1)) / ((X^2 - X + 1) / (X^2 - 1))
I hope you see the difference(s).