We need to integrate $z$ from $- \infty$ to $\infty$ where we are given the below equation:
$$a \int \exp \left\{ \frac{-(z-m)^2}{2 \sigma_{m}^2}\right\}\exp \left\{ \frac{-(y-z)^2}{2 \sigma_{i}^2}\right\} dz$$
The resulting function will also be a Gaussian. I would appreciate if anyone can help.
Hint: $$\frac{(x-a)^2}{A} + \frac{(x-b)^2}{B} = \frac{1}{AB}\left((A+B)x^2 - 2(aB + bA)x + a^2B + b^2A\right)$$
Can you complete the square?