Example 2 Let the set $A=\left\{y \mid y=x^{2}-4 x+3\right\}, B=\left\{y \mid y=-x^{2}-2 x\right\}$, find $A \cap$ $B, A \cup B$.
Solution: According to the problem, $A=\{y \mid y \geqslant-1\}, B=\{y \mid y \leqslant 1\}$, so $A \cap B=\{y \mid-1 \leqslant$ $y \leqslant 1\}, A \cup B=\mathbf{R}$.