The common property of the delta function is:
$\int_{-\infty}^{\infty}f(x)\delta(x-a)dx = f(a)$
However the proof of the Greens Theorem states that
$\int_{-\infty}^{\infty}f(a)\delta(x-a)da = f(x)$
How are these two equivalent? In the second equation should we not switch $x$ and $a$?
Denote $a$ by $y$ in the second equation. Then we have
$$\int_{-\infty}^{\infty}f(y)\delta(x-y)\ dy=\int_{-\infty}^{\infty}f(y)\delta(-(y-x))\ dy.$$
Since $\delta(x)$ is an even "function" we have
$$\delta(-(y-x))=\delta(y-x).$$
So, $$\int_{-\infty}^{\infty}f(y)\delta(y-x)\ dy=f(x).$$
Now, change back $y$ to $a$ and play it again.