Answer
$c=-\frac{1}{2}$.
Work Step by Step
Since $y=x-2+e^{cx}$, then we have $y'=1+ce^{cx}$. Now, by substitution, we get
$$2y'+y=2+2ce^{cx}+x-2+e^{cx}=x$$
which leads to
$$(2c+1)e^{cx} =0$$
that is, $2c+1=0$ and hence $c=-\frac{1}{2}$.
You can help us out by revising, improving and updating this answer.
Update this answerAfter you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.