Answer
$y = -2-cot~(x-\frac{\pi}{2})$
We can see the graph below.
Work Step by Step
$y = -2-cot~(x-\frac{\pi}{2})$
When $x = -\frac{\pi}{2}$, then $y = -2-cot~(-\pi)$ (which is undefined)
When $x = -\frac{\pi}{4}$, then $y = -2-cot~(-\frac{3\pi}{4}) = -3$
When $x = 0$, then $y = -2-cot~(-\frac{\pi}{2}) = -2$
When $x = \frac{\pi}{4}$, then $y = -2-cot~(-\frac{\pi}{4}) = -1$
When $x = \frac{\pi}{2}$, then $y = -2-cot~(0)$ (which is undefined)
We can see the graph below.