[tex]f(t)=\begin{cases}\cos t&\text{for }0\le t<\pi\\0&\text{for }t\ge\pi\end{cases}[/tex]
Write [tex]f(t)[/tex] in terms of the step function [tex]u(t)[/tex]:
[tex]f(t)=(u(t)-u(t-\pi))\cos t[/tex]
where the step function is defined by
[tex]u(t)=\begin{cases}1&\text{for }t\ge0\\0&\text{for }t<0\end{cases}[/tex]
The Laplace transform is then
[tex]\mathcal L_s\{f(t)\}=F(s)=\displaystyle\int_0^\infty f(t)e^{-st}\,\mathrm dt=\int_0^\pi\cos t\,e^{-st}\,\mathrm dt[/tex]
[tex]\implies F(s)=\dfrac{(e^{-\pi s}+1)s}{s^2+1}[/tex]
(if you're stuck on the integral, try integrating by parts)