So far I used $u$-substitution and got the work below.
$$\int_{0}^{\pi} ie^{3it} dt= \frac{1}{3}e^{3it}\Big|_0^\pi $$
Now, I just want to be sure that $e^{3it}=\cos(3t)+i\sin(3t)$ is correct so I can finish solving the rest of the problem.
However, if my method is incorrect please point me in the right direction.
Your working is fine so far, just evaluate
$$\frac13 \left( \cos(3t) +i \sin(3t) \right) \mid_0^\pi$$