Well, solving a more general problem:
$$\mathscr{I}_{\space\text{n}}\left(\text{m}\right):=\int\cos\left(\text{n}\cdot x\right)\cdot\exp\left(\text{m}\cdot x\right)\space\text{d}x\tag1$$
Using integration by parts:
$$\int\text{f}\space\text{d}\text{g}=\text{f}\cdot\text{g}-\int\text{g}\space\text{d}\text{f}\tag2$$
Where:
$$\text{f}=\cos\left(\text{n}\cdot x\right)\space,\space\text{d}\text{g}=\exp\left(\text{m}\cdot x\right)\space,\space\text{d}\text{f}=-\text{n}\cdot\sin\left(\text{n}\cdot x\right)\space,\space\text{g}=\frac{\exp\left(\text{m}\cdot x\right)}{\text{m}}\tag3$$
So, we get:
$$\mathscr{I}_{\space\text{n}}\left(\text{m}\right)=\frac{\exp\left(\text{m}\cdot x\right)}{\text{m}}\cdot\cos\left(\text{n}\cdot x\right)+\frac{\text{n}}{\text{m}}\cdot\int\sin\left(\text{n}\cdot x\right)\cdot\exp\left(\text{m}\cdot x\right)\space\text{d}x\tag4$$
Using integration by parts, again:
$$\int\text{q}\space\text{d}\text{p}=\text{q}\cdot\text{p}-\int\text{p}\space\text{d}\text{q}\tag5$$
Where:
$$\text{q}=\sin\left(\text{n}\cdot x\right)\space,\space\text{d}\text{p}=\exp\left(\text{m}\cdot x\right)\space,\space\text{d}\text{q}=\text{n}\cdot\cos\left(\text{n}\cdot x\right)\space,\space\text{p}=\frac{\exp\left(\text{m}\cdot x\right)}{\text{m}}\tag6$$
So, we get:
$$\mathscr{I}_{\space\text{n}}\left(\text{m}\right)=\frac{\text{n}\cdot\sin\left(\text{n}\cdot x\right)\cdot\exp\left(\text{m}\cdot x\right)}{\text{m}^2}+\frac{\cos\left(\text{n}\cdot x\right)\cdot\exp\left(\text{m}\cdot x\right)}{\text{m}}-\frac{\text{n}^2}{\text{m}^2}\cdot\mathscr{I}_{\space\text{n}}\left(\text{m}\right)\tag7$$
So, we also know:
$$\mathscr{I}_{\space\text{n}}\left(\text{m}\right)=\frac{\frac{\text{n}\cdot\sin\left(\text{n}\cdot x\right)\cdot\exp\left(\text{m}\cdot x\right)}{\text{m}^2}+\frac{\cos\left(\text{n}\cdot x\right)\cdot\exp\left(\text{m}\cdot x\right)}{\text{m}}}{1+\frac{\text{n}^2}{\text{m}^2}}\tag8$$