Let $f: [a,b] \to \mathbb C, t \to f(t) = \text {Re } f(t) + i\text{ Im } f(t)$. Suppose $f$ is continuous.
Let $\int\limits_a^b f(t)dt = \rho e^{i\theta}$, where $\rho \geq 0$ is the module. Then: $$|\int\limits_a^b f(t)dt| = \rho = e^{-i\theta}\int\limits_a^b f(t)dt = \text{Re }\int\limits_a^b e^{-i\theta}f(t)dt = \int\limits_a^b \text{Re }(e^{-i\theta}f)(t)dt \leq \int\limits_a^b |f(t)|dt$$
I don't understand 2 steps:
$e^{-i\theta}\int\limits_a^b f(t)dt = \text{Re }\int\limits_a^b e^{-i\theta}f(t)dt$
$\int\limits_a^b \text{Re }(e^{-i\theta}f)(t)dt \leq \int\limits_a^b |f(t)|dt$
The first step isn't right, and it should have $+i\theta$ rather than $-i\theta$. This is because
$$\rho = e^{i\theta} \big(\rho e^{-i\theta}\big) = e^{i\theta} \int_a^b f(t) \, dt$$
Now take real parts - since $\rho$ is real, the right hand side is real too.
The second step is just an application of the fact that the real part is bounded by the modulus, together with the fact that $|e^{i\theta}| = 1$.