Answer
$f(x)=\begin{cases} \ \ \ 1,\ x\le -1 \\ -1,\ x\gt 2\end{cases}$
domain $(-\infty,-1]U(2,\infty)$ and range $\{-1,1 \}$
Work Step by Step
Step 1. Identify the left line equation as $y=1$ with $x\le -1$.
Step 2. Identify the right line equation as $y=-1$ with $x\gt 2$.
Step 3. Combine the above to get: $f(x)=\begin{cases} \ \ \ 1,\ x\le -1 \\ -1,\ x\gt 2\end{cases}$
Step 4. Identify the domain as $(-\infty,-1]U(2,\infty)$ and range as $\{-1,1 \}$