In quantum mechanics, with the Hamiltonian $ H=H_0+H' $, we define four kinds of Green's functions by the equations
$$ \left ( i\frac{\partial }{\partial t} -H_0\right )G^{\pm }=\delta (t) $$
$$ \left ( i\frac{\partial }{\partial t} -H \right )\mathscr{G} ^{\pm }=\delta (t) $$
and the initial conditions
$$ G^+(t)=\mathscr{G}^+(t)=0,\ \text{for}\ t<0 $$
$$ G^-(t)=\mathscr{G}^-(t)=0,\ \text{for}\ t>0. $$
$ G^{\pm} $ must commute with $ H_0 $ and similarly $ \mathscr{G}^{\pm } $ with $ H $. How can I work with this definitions to get the integral equation
$$ \mathscr{G}^{\pm }(t-t')=G^{\pm }(t-t')+\int_{-\infty}^{+\infty}dt''G^{\pm }(t-t'')H'\mathscr{G}^{\pm }(t''-t') $$
or
$$ \mathscr{G}^{\pm }(t-t')=G^{\pm }(t-t')+\int_{-\infty}^{+\infty}dt''\mathscr{G}^{\pm }(t-t'')H'G^{\pm }(t''-t')? $$