How to pull out the momentum operator? 
In the equation (1.7.17), how does operator $p$ get out of the bracket without any operation though $<a | $, $| x'>$ are function of $x'$? How to prove this?
 A: $\newcommand{ket}[1]{\left| #1 \right>}$
$\newcommand{bra}[1]{\left< #1 \right|}$
$\newcommand{bk}[2]{\left< #1  \big| #2 \right> }$
Though I am not sure 100% if what I am going to do is legitimate I would suggest the following (I am about 90% sure that it is legitimate):
The confusion arises because the author has used $x'$ for two distinct things, namely one for translation and one for the identity operator $\mathbb{1}=\int \ket{x}\bra{x} \mathrm{d}x$. I suggest using $\Delta x$ for the translation so that they would be two distinct things, which leads to the following:
$$\int \mathrm{d}x' \ket{x'}\left(\bk{x'}{a} - \Delta x \frac{\partial}{\partial x} \bk{x'}{a} \right) \tag{1.7.15}$$
Again comparing both sides yields:
$$\hat{p}\ket{a}= \frac{\hbar}{i} \int \mathrm{d}x'  \ket{x'}  \frac{\partial}{\partial x} \bk{x'}{a} $$
Acting on it with $\bra{x}$ yields:
\begin{align}
\bra{x}\hat{p}\ket{a} &= \frac{\hbar}{i} \int \mathrm{d}x'  \bk{x}{x'}  \frac{\partial}{\partial x} \bk{x'}{a} \\
&=  \frac{\hbar}{i} \int \mathrm{d}x'  \delta(x-x')  \frac{\partial}{\partial x} \bk{x'}{a} \\
&= \frac{\hbar}{i}   \frac{\partial}{\partial x} \bk{x}{a}
 \end{align}
Notice that this is the same equation with $x$ and $x'$ changed, which doesn't affect the final answer.
