Splitting the function into the negative and positive parts of the domain of $x$ gives $$ e^{-|x|}= \left\{ \begin{aligned} &e^x, &x ≤ 0 \\ &e^{-x}, &x > 0, \end{aligned} \right. $$ which is trivial to integrate.
Now, the problem is, the answer given in our professor's quiz, and by Wolfram Alpha, is:
$$ \int e^{-|x|}\ dx= \left\{ \begin{aligned} &e^x + c, &x ≤ 0 \\ -&e^{-x} + 2 + c, &x > 0 \\ \end{aligned} \right. $$
I have absolutely no idea where the $+2$ term could come from.
The $+2$ is added so that the derivative is continuous at $x = 0$.
This has the advantage that the derivative at $x = 0$ also exists and is equal to $1$.