In integration by parts, does it matter which of your terms is v (or, rather $f(x)$) and which term is du (or, rather $ f'(x) $?
Also, I'm having trouble finding $\int e^{2x} \cos(3x)dx $. I keep getting $$\frac {2e^{2x}(6\sin(3x) - \cos(3x))}{37}$$ when $u=e^{2x}$ and $dv = \cos(3x) dx $.
Thanks!
Regarding which term is which: Yes and no. In $\int u \mathrm{d}v$ the strict requirement is that $\mathrm{d}v$ is something you can successfully integrate and $u$ is something you can successfully differentiate. If some other partition of the integrand gives you a pair that you can do these things to, you should be able to proceed. However, it is required that you get something "simpler", otherwise you will never finish. Consider $\int x \mathrm{e}^x \mathrm{d}x$. If in repeated integration by parts you persist in choosing $u = \mathrm{e}^x$ and then integrating the polynomial, the integral will never get simpler. So to ever finish reducing the integral to simpler terms, you must make choices that make the resulting integrals $\int v \mathrm{du}$ simpler (or at least eventually simpler).
In your particular problem, when $u = \mathrm{e}^{2x}$ and $\mathrm{d}v = \cos(3x) \mathrm{d}x$, you should get $\mathrm{d}u = 2 \mathrm{e}^{2x}\mathrm{d}x$ and $v = \frac{1}{3} \sin(3x)$. So, let $I = \int \mathrm{e}^{2x} \cos(3x) \mathrm{d}x$.
$$ I = \frac{1}{3} \mathrm{e}^{2x} \sin(3x) - \frac{2}{3} \int \mathrm{e}^{2x} \sin(3x) \mathrm{d}x $$ We "have a choice". If we set $\mathrm{d}v = \mathrm{e}^{2x} \mathrm{d}x$ and $u = \sin(3x)$, then we exactly undo what we did in the first step, so that will not result in progress. Therefore, we make the choice in the same way as in the first step: $u = \mathrm{e}^{2x}$ and $\mathrm{d}v = \sin(3x) \mathrm{d}x$, giving $\mathrm{d}u = 2 \mathrm{e}^{2x}\mathrm{d}x$ and $v = -\frac{1}{3}\cos(3x)$. Thus, \begin{align*} I &= \frac{1}{3} \mathrm{e}^{2x} \sin(3x) - \frac{2}{3} \left( -\frac{1}{3}\mathrm{e}^{2x}\cos(3x) + \frac{2}{3} \int \mathrm{e}^{2x} \cos(3x) \mathrm{d}x\right) \\ &= \frac{1}{3} \mathrm{e}^{2x} \sin(3x) + \frac{2}{9}\mathrm{e}^{2x}\cos(3x) - \frac{4}{9} I \\ \frac{13}{9}I &= \frac{1}{9} \mathrm{e}^{2x}\left( 3\sin(3x) + 2\cos(3x) \right) \\ I &= \frac{1}{13} \mathrm{e}^{2x}\left( 3\sin(3x) + 2\cos(3x) \right) \end{align*}