The question asks you to find values of x satisfying:
$|x - 3| + |x + 1| = 4$
The official solution's first step is:
$|x - 3| + |x + 1| \geq |(x - 3) - (x + 1)| = 4$
which makes sense to me
The next statement is:
"Equality occurs when $(x-3)(x+1) \leq 0$"
Where does that come from?
Equality is reached iff $(x-3)$ and $-(x+1)$ have the same sign. An equivalent condition is that $-(x-3)(x+1) \geq 0$, which is the same as $(x-3)(x+1) \leq 0$.