A product of two (or more) factor can be zero if and only if at least one of the factors is zero.
In other words, you cannot multiply two non-zero real numbers, and have zero as a result.
So, if we want the product of these two factors to be zero, at least one of them has to be zero.
The first factor is zero if
\(x-2 = 0 \iff x=2\)
The second factor is zero if
\(x+5 = 0 \iff x=-5\)