so first group them
(x^3+x^2) + (3x+3)
Then factor out the gcf of both groups
x^2(x+1)+3(x+1)
Since the stuff in the parentheses are the same for both groups, we can just put the stuff outside together and leave the (x+1) as a factor
So your final solution:
(x^2+3)(x+1)