I am struggling to understand where in this question it has been indicated that the contour integral is $ C_{R} $ i.e. the union of $[-R,R]$ and the semicircle with $r>1$
a part of the solution: N.B. there is an error in the question the ode doesn't include a 2.


Presumably, the steps leading up to this part of the solution are \begin{multline} \mathcal{F}\left[-\frac{df}{dx} + f\right] = ik\hat{f} + \hat{f} = i(k-i)\hat{f} = \hat{g}\\\Longrightarrow\hat{f} = -i\frac{\hat{g}}{k-i}\\\Longrightarrow f = -i\mathcal{F}^{-1}\left[\frac{\hat{g}}{k-i}\right]= -i\mathcal{F}^{-1}\left[\frac{1}{k-i}\right]*g, \end{multline} where $*$ represents the convolution. From the definition of the convolution we then see that $k(x,y) = -i\mathcal{F}^{-1}[(k-i)^{-1}](y-x)$, and all we need to do is evaluate the inverse Fourier transform integral.
A common way to evaluate inverse Fourier transform integrals of meromorphic functions over the real line is to make a closed semicircular contour like the one in the solution, then let the radius of the contour go to infinity. The contribution of the circular part (ideally) vanishes in this limit, and we're just left with the integral over the real line and the sum over residues in the upper half plane. Starting from where the solution left off, we have $$ \int_{C_R}\frac{e^{izx}}{z-i}dz = \int_{-R}^{R}\frac{e^{ikx}}{k-i}dk + \int_0^\pi\frac{e^{ixRe^{i\theta}}}{Re^{i\theta}-i}iRe^{i\theta}d\theta = 2\pi ie^{-x}. $$ Now let's look closer at that semicircle integral in the limit that $R\rightarrow\infty$. We have $$ \left|\int_0^\pi\frac{e^{ixRe^{i\theta}}}{Re^{i\theta}-i}iRe^{i\theta}d\theta\right| \le \int_0^\pi\left|\frac{Re^{i\theta +ixR\cos\theta}}{Re^{i\theta}-i}e^{-xR\sin\theta}\right|d\theta = \int_0^\pi\frac{e^{-xR\sin\theta}}{|1-ie^{-i\theta}R^{-1}|}d\theta. $$ It should be fairly clear that, if $x>0$, the exponential term causes the last integral to vanish as $R\rightarrow \infty$. This is the key to the argument and why we chose the semicircle to be in the upper half plane. So we then have $$ \int_{-\infty}^{\infty}\frac{e^{ikx}}{k-i}dk = 2\pi ie^{-x}\quad,\quad x>0. $$ I'll let you work out what happens if $x < 0$ (it requires doing some simple substitutions to make the above argument still work), but the end result is $$ \int_{-\infty}^{\infty}\frac{e^{ikx}}{k-i}dk = 2\pi ie^{x}\quad,\quad x<0. $$ And so $$ k(x,y) = -i\mathcal{F}^{-1}\left[\frac{1}{k-i}\right](y-x) = \frac{1}{2\pi i}\int_{-\infty}^{\infty}\frac{e^{ik(y-x)}}{k-i}dk = e^{-|y-x|} $$