How to apply squeeze theorem to this limit.
The values of trigonometric functions oscillate between $1$ and $-1$.
Your upper bound is:
$$ \lim_{t \to \infty} \int_{0}^{t} e^{-x}\cos(x)\,dx = \frac{1}{2} \lim_{t \to \infty}(e^{-t}(1) - e^{-t}(-1)) + \frac{1}{2}. $$
We don’t know what value our trigonometric functions take at infinity but they can’t take any larger value clearly. So we set $\cos$ to $-1$ and $\sin$ to $1$ as it will give $\frac{1}{2}(2e^{-t})+\frac{1}{2}$.
And our lower bound is:
$$ \lim_{t \to \infty} \int_{0}^{t} e^{-x}\cos(x)\,dx = \frac{1}{2} \lim_{t \to \infty}(e^{-t}(-1) - e^{-t}(1)) + \frac{1}{2}. $$
Which gives us $\frac{1}{2}(-2e^{-t}) + \frac{1}{2}$.
It’s clear that $e^{-t}$ goes to zero and so our limit is ‘squeezed’ to $\frac{1}{2}$ from both sides.