My professor gave problems out to practice for our final on Wednesday. This problem is based on the transformation of two random variables. It a 5 part problem, so I will list the necessary portions for this part.
$W=X$
$Z=X+Y$
This leads to part (c), $f_{XY}(w,z-w)=f_X(w)f_Y(z-w)$, independence implied.
We are then given for part (d) $$f_U(u)=\frac{1}{\sqrt{2\pi}}\text{exp}{\bigg(-\bigg(u-\frac{z^2}{2}\bigg)\bigg)}$$
with mean $\frac{z}{2}$ and variance of $\frac{1}{2}$. Based on (c) and (d) he asks us to find $f_{X+Y}(z)$, where $X$ and $Y$ follow a standard normal distribution. Here is his answer
$$\begin{align}f_{X+Y}(z)=&~ \int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}}e^{-w^2/2}\frac{1}{\sqrt{2\pi}}e^{-(w-z)^2/2}\operatorname d w
\\[1ex] =&~ \frac{1}{2\sqrt{\pi}}e^{-z^2/4}\int_{-\infty}^{\infty}\frac{1}{\sqrt{\pi}}\text{exp}\bigg(-\bigg(w-\frac{z^2}{2}\bigg)\bigg)\operatorname d w\end{align}$$
I understand that he is setting the problem up to make a substitution using what we have from part (d), but I do not understand how he factored $e^{-z^2/4}$ from the equation. I have played around with it in so many different ways, have checked laws of exponents, and I am seriously stumped. Any help would be much appreciated.
You are right; you cannot get that end result. It looks like a typo is the sauce of confusion. Taking it slow we have:
$$\begin{align}f_{X+Y}(z)=&~ \int_{-\infty}^{\infty}\frac{1}{\sqrt{2\pi}}e^{-w^2/2}\frac{1}{\sqrt{2\pi}}e^{-(w-z)^2/2}\operatorname d w \\[1ex] =&~ \frac{1}{2\sqrt{\pi}}\int_{-\infty}^{\infty}\frac{1}{\sqrt{\pi}}e^{-((w-z)^2+w^2)/2}\operatorname d w \\[1ex] =&~ \frac{1}{2\sqrt{\pi}}\int_{-\infty}^{\infty}\frac{1}{\sqrt{\pi}}e^{-(w^2-wz+z^2/2)}\operatorname d w \\[1ex] =&~ \frac{1}{2\sqrt{\pi}}\int_{-\infty}^{\infty}\frac{1}{\sqrt{\pi}}e^{-(w^2-wz+z^2/4)-z^2/4}\operatorname d w \\[1ex] =&~ \frac{1}{2\sqrt{\pi}}e^{-z^2/4}\int_{-\infty}^{\infty}\frac{1}{\sqrt{\pi}}e^{-(w-\frac{z}{2})^2}\operatorname d w \\[1ex] =&~ \frac{1}{2\sqrt{\pi}}e^{-z^2/4}\int_{-\infty}^{\infty}\frac{1}{\sqrt{\pi}}\exp\left(-\left(w-\frac{z}{2}\right)^2\right)\operatorname d w \end{align}$$
Notice the placement of the square in the exponential function. It is outside the inner brackets, rather than just over the $z$.
$$f_U(u) = \frac{1}{\sqrt{2\pi}}\exp{\left(-\left(u-\frac{z}{2}\right)^2\right)}$$