The function is as follows
The sign diagram for that in the book is as follows:
As seen on the pic and graph it is only positive before -2, NOT after 1. Or did I miss something?
Yes, the book seems to be wrong. The most likely explanation is that they found roots at $x = -2$ and $x = 1$, but didn't realize that the second one doesn't actually change the sign of the function.