I know the right answer to this I just don't know how to get it, please help.

what is the product in simplest form? State any restrictions on the variable. (x^2+5x+6/x+4)*(x^2+x-12/x^2+x-2)



The right answer to this is (x+3)(x-3)/x-1
restrictions: -2, -4, 1