Constructing a Green's function for BVP 
Given BVP
$$ \begin{cases} y'' - y = f(x) \\ y( \pm \infty) = 0 \end{cases} $$
I need to find a Green's function $G(x,a)$ so that particular solution
  is given by $y_P(x) = \int\limits_{- \infty}^{\infty} G(x,a) f(a) da
 $.

Try:
First, easy to find homogeneous solution: $y(x) = C_1 e^x + C_2 x e^x $. Green Function $G(x,a)$, we know, satisfies $G''(x,a) - G(x,a) = \delta(x-a)$. Therefore,
$$ G(x,a) = \begin{cases} A_1 e^x + B_1 x e^x, \; \;\; \; x<a \\ A_2 e^x + B_2 x e^x, \; \; \; \; x>a \end{cases} $$
Using boundary condition we have
$$ \lim_{x \to \infty} A_2 e^x + B_2 x e^x = 0 \implies A_2 = B_2 = 0$$
and
$$ \lim_{x \to - \infty} A_1 e^x + B_1 x e^x = 0 \implies A_1,B_1 \; \; \text{can be any numbers}$$
Thus, we have if $x<a$
$$ G(x,a) = A_1 e^x + B_1 x e^x $$
and $0$ otherwise. Now, since $G(x,a) $ is continous at $a$, we have 
$$ A_1 e^a + B_1 a e^a = 0 \implies A_1 = - B_1 a $$
Thus, we have now $G(x,a) = B_1 x e^x - B_1 a e^x $. Now, $\partial_xG(x,a)$ has a jump discontinuity at $x=a$ of length $1$. Thus,
$$ B_1 e^a + B_1 a e^a - B_1 a e^a = 1 \implies B_1 = e^{-a}$$
Therefore, we conlude that 
$$ G(x,a) = x e^{x-a} + a $$
However, professor say that 
$$ G(x,a) = - \frac{1}{2} e^{-|x-a|} $$
What am I doing wrong??

It appears your mistake is in the solution to the homogeneous equation:
$$
y''-y=0
$$
has characteristic equation $\lambda^2-1=0$, which yields $\lambda=\pm 1$, and therefore the solution to the homogeneous problem is
$$
y(x) = Ae^x+Be^{-x}
$$
From here, you will find that $A_1=0$ and $B_2=0$. Then continuity and jump condition will reveal the value for $A_2$ and $B_1$.
