The first thing to always do with factoring is looking for like terms. You can see that the first two terms share an x whereas the second have nothing in common.
Factor the first set and examine what's left.
You can notice the i and x are common, but the sign is different. Thus, I factor out the negative one on the right grouping.
Now you can see that there is another common factor. (x+i) is equal to (i+x) which means it can also be factored out to leave you with:
If you do the multiplication, it should multiply out as well to check your answer.