How can I solve $\frac{(1-x)(x+3)}{(x+1)(2-x)}\leq0$ and express solution in interval notation? The inequality I need to solve is
$$\frac{(1-x)(x+3)}{(x+1)(2-x)}\leq0$$
My attempt:
Case I: $x<2$
Then we have $(1-x)(x+3)\leq0$
$x\leq-3, x\geq1$
We reject $x\leq-3$ (not sure why exactly, I just looked at the graph on desmos and it shows that $x\geq1$
Case II: $x<-1$
Then we have $(1-x)(x+3)\geq0$
$x\geq-3, x\leq-1$
Reject $x\leq-1$ (again, not sure exactly why aside from the graph I saw on desmos)
So the final solution is $x\in[-3,-1) \cup [1,2)$
I know that my final solution is correct, however I am a little confused on why I reject certain values.

The key insight here is that for a fraction to be negative you need to have the numerator and denominator have opposite signs.  If you have $$\frac{A}{B}\le 0$$ then either you have $A\le 0$ and $B> 0$ or you have $A\ge 0$ and $B< 0$.  This gives us two cases, with several sub-cases:
Case $1$:
$$(1-x)(x+3)\le 0\quad\text{and}\quad(x+1)(2-x)> 0$$
Here we need to remember that for a product to be negative the factors have opposite signs, and for a product to be positive then the factors have the same sign.  We have some sub-cases, then:
Case $1a$:
\begin{align*}
1-x &\le 0 \implies x\ge 1\\
x+3 &\ge 0\implies x \ge -3\\
x + 1 &> 0\implies x> -1\\
2 - x &> 0\implies x< 2
\end{align*}
Looking at the overlap between these four inequalities we get $1\le x < 2$.
Case $1b$:
\begin{align*}
1-x &\le 0 \implies x\ge 1\\
x+3 &\ge 0\implies x \ge -3\\
x + 1 &< 0\implies x< -1\\
2 - x &< 0\implies x> 2
\end{align*}
These inequalities are inconsistent so we don't get any more solutions.
Case $1c$:
\begin{align*}
1-x &\ge 0 \implies x\le 1\\
x+3 &\le 0\implies x \le -3\\
x + 1 &> 0\implies x> -1\\
2 - x &> 0\implies x< 2
\end{align*}
These inequalities are inconsistent so we don't get any more solutions.
Case $1d$:
\begin{align*}
1-x &\ge 0 \implies x\le 1\\
x+3 &\le 0\implies x \le -3\\
x + 1 &< 0\implies x< -1\\
2 - x &< 0\implies x> 2
\end{align*}
These inequalities are inconsistent so we don't get any more solutions.
Case $2$:
$$(1-x)(x+3)\ge 0\quad\text{and}\quad(x+1)(2-x)< 0$$
Case $2a$:
\begin{align*}
1-x &\ge 0 \implies x\le 1\\
x+3 &\ge 0\implies x \ge -3\\
x + 1 &> 0\implies x> -1\\
2 - x &< 0\implies x> 2
\end{align*}
These inequalities are inconsistent so we don't get any more solutions.
Case $2b$:
\begin{align*}
1-x &\ge 0 \implies x\le 1\\
x+3 &\ge 0\implies x \ge -3\\
x + 1 &< 0\implies x< -1\\
2 - x &> 0\implies x< 2
\end{align*}
Looking at the overlap between these four inequalities we get $-3\le x < -1$.
Case $2c$:
\begin{align*}
1-x &\le 0 \implies x\ge 1\\
x+3 &\le 0\implies x \le -3\\
x + 1 &> 0\implies x> -1\\
2 - x &< 0\implies x> 2
\end{align*}
These inequalities are inconsistent so we don't get any more solutions.
Case $2d$:
\begin{align*}
1-x &\le 0 \implies x\ge 1\\
x+3 &\le 0\implies x \le -3\\
x + 1 &< 0\implies x< -1\\
2 - x &> 0\implies x< 2
\end{align*}
These inequalities are inconsistent so we don't get any more solutions.
Overall, then, we get the solution $-3\le x < -1$ and $1\le x < 2$.
