-The answer is:

This is a quadratic expression, factored out. The roots are:

This tell us that the function in x 0 -1 and x = 4 is equal to zero. We what to find all the x for which the function is positive.
If we grapf the points in a line:
The red point are the places where the function is zero. We want to know what happends between those points. If the function is positive between -1 and 4, then the answer would we that interval. If the function is negative in that interval, then we want to know if the function is positive outside the interval:
Let's take a point between -1 and 4 and to make simpler: x = 0
Let's see whats the value: (0 - 4)(0 + 1) = (-4) * 1 = -4
It's negative, then the inequality (x - 4)(x +1) > 0 is false in the interval (-1, 4)
Let's see what happends outside the interval (-1, 49. Let's take the points x = -5 and x = 5, because -5 < -1 and 4 < 5
(5 - 4)(5 +1) = 1 * 6 = 6 It's positive.
(-5 - 4)(-5 + 1) = (-9)(-4) = 36 It's positive.
Then the answer are all the x's smaller than -1 and greater than 4.