\begin{align*} \langle p \rangle &= \int_{-\infty}^\infty \frac{d p}{2\pi \hbar}\, \phi(p, t)^\ast \, p \, \phi(p, t) = \int_{-\infty}^{\infty} \frac{d p}{2 \pi \hbar} \int_{-\infty}^\infty dx' \, \psi(x', t)^\ast \, e^{\frac{i}{\hbar} p x'} \, p \int_{-\infty}^\infty dx \, \psi(x, t) \, e^{-\frac{i}{\hbar} p x} \\ &= \int_{-\infty}^{\infty} \frac{d p}{2 \pi \hbar} \int_{-\infty}^\infty dx' \, \psi(x', t)^\ast \, e^{\frac{i}{\hbar} p x'} \, \int_{-\infty}^\infty dx \, \psi(x, t) \, \left(-\frac{\hbar}{i} \frac{\partial}{\partial x}e^{-\frac{i}{\hbar} p x}\right) \\ &= \int_{-\infty}^{\infty} \frac{d p}{2 \pi \hbar} \int_{-\infty}^\infty dx' \, \psi(x', t)^\ast \, e^{\frac{i}{\hbar} p x'} \, \int_{-\infty}^\infty dx \, e^{-\frac{i}{\hbar} p x}\, \left(\frac{\hbar}{i} \frac{\partial}{\partial x}\psi(x, t)\right) \\ &= \int_{-\infty}^\infty dx' \int_{-\infty}^\infty dx \, \delta(x-x') \, \, \psi(x', t)^\ast \, \left(\frac{\hbar}{i} \frac{\partial}{\partial x}\psi(x, t)\right) \\ &= \int_{-\infty}^\infty dx \, \psi(x, t)^\ast \, \left(\frac{\hbar}{i} \frac{\partial}{\partial x}\psi(x, t)\right) \\ \end{align*}
I do not understand how to get from the third row to the fourth row. Does the Fourier transform of $e^{-\frac{i}{\hbar} p (x- x')}$ yield $\delta(x-x')$? Why?
How do I calculate the Fourier transform in the case where I have two position variables, like $x$ and $x'$?
First, the Fourier Transform pairs $f\leftrightarrow F$ are given by
$$\begin{align} F(p)&=\int_{-\infty}^{\infty}f(x)e^{-ipx/\hbar}dx \\\\ f(x)&=\frac{1}{2\pi\hbar}\int_{-\infty}^{\infty}F(p)e^{ipx/\hbar}dp \tag 1 \end{align}$$
Next, we know that the Dirac Delta acts as a distribution on a test function $\phi$ with
$$\int_{-\infty}^{\infty}\phi(x)\delta(x-x')dx=\phi(x') \tag 2$$
Now, letting $\phi(x)=e^{-ipx/\hbar}$ in $(2)$ shows that
$$\begin{align} \int_{-\infty}^{\infty}\phi(x)\delta(x-x')dx&=\int_{-\infty}^{\infty}e^{-ipx/\hbar}\delta(x-x')dx\\\\ \tag 3 &=e^{-ipx'/\hbar} \end{align}$$
Note that the right-hand side of $(3)$ is also the Fourier Transform $(1)$ of the shifted Dirac Delta. Thus, the inverse Fourier Transform of $e^{-ipx/\hbar}$ must be the shifted Dirac Delta. Thus, we can write
which was to be shown.