We are given the differential equation:
\[
\frac{e^y}{dx} = x + 2
\]
First, rewrite it in the form:
\[
e^y \frac{dy}{dx} = x + 2
\]
Now, separate the variables \( y \) and \( x \):
\[
e^y dy = (x + 2) dx
\]
Integrate both sides:
\[
\int e^y \, dy = \int (x + 2) \, dx
\]
The integral of \( e^y \) with respect to \( y \) is \( e^y \), and the integral of \( (x + 2) \) with respect to \( x \) is:
\[
\int (x + 2) \, dx = \frac{(x + 2)^2}{2} + C
\]
Thus, the solution is:
\[
e^y = \frac{(x + 2)^2}{2} + C
\]
Solving for \( y \), we get:
\[
y = \log(x + 2) + C
\]
Thus, the correct answer is option (B):
\[
y = (x + 2) \log(x + 2) - x + C
\]
Thus, the correct answer is option (B).