Instead compute,

$\displaystyle \int_0^{2\pi} \frac{e^{3i\theta}}{5-4\cos \theta} d\theta= \int_0^{2\pi}\frac{\cos 3\theta}{5-4\cos \theta} d\theta + i \int_0^{2\pi}\frac{\sin 3\theta }{5-4\cos \theta} d\theta $.

Note that,

$\displaystyle \int_0^{2\pi} \frac{e^{3i\theta}}{5-4\cos \theta} d\theta = \oint_{|z|=1} \frac{z^3}{5 - 2(z+z^{-1})}\cdot \frac{1}{iz} dz = \frac{1}{i} \oint_{|z|=1} \frac{z^3}{(1-2z)(z-2)} dz$.

By residue theorem,

$\displaystyle \oint_{|z|=1} \frac{z^3}{(1-2z)(z-2)} dz = \frac{2\pi i}{24} = \frac{\pi i}{12} $.

Thus,

$\displaystyle \int_0^{2\pi} \frac{e^{3 i \theta}}{5-4\cos \theta} d\theta = \frac{\pi i}{12} \implies \int_0^{2\pi} \frac{\cos 3\theta}{5-4\cos \theta} d\theta = \frac{\pi}{12}$.