DTFT and Inverse DTFT Homework Problem
The only thing you need to know is that an LTI system's response to a sinusoidal input signal is a sinusoidal output signal with the same frequency as the input signal, with its amplitude and phase modified by the magnitude and phase of the system's transfer function evaluated at the input frequency, or, in math:

$$x[n]=A\cos(\omega_0n)\Longrightarrow y[n]=A|H(\omega_0)|\cos(\omega_0n+\phi(\omega_0))\tag{1}$$

where $x[n]$ and $y[n]$ are the input and output signals, respectively, and $H(\omega)=|H(\omega)|e^{j\phi(\omega)}$ is the system's frequency response.

So if you got $H(\omega)$, you just need to evaluate it at the given input frequency $\omega_0=\pi/2$ and apply $(1)$. Splitting up the cosine into two complex exponentials, as suggested by the given solution, is not necessary (and not even easier I'd say).