Explanation:
The last step is a little wrong. Lemme show you:
x(x + 2) + (x + 2)
Imagine there is an invisible '1' infront of (x + 2) like this:
= x(x + 2) + 1(x + 2)
Now we can combine the like terms together:
= (x + 1)(x + 2)
This is the correct factorization.