We are given the differential equation:
\[
\frac{dy}{dx} = y + 3
\]
This is a first-order linear differential equation. To solve it, we use the method of separation of variables. First, rewrite the equation as:
\[
\frac{dy}{dx} = y + 3 \quad \Rightarrow \quad \frac{dy}{y + 3} = dx
\]
Now integrate both sides:
\[
\int \frac{1}{y + 3} \, dy = \int dx
\]
The left-hand side gives \( \ln |y + 3| \), and the right-hand side gives \( x + C \), where \( C \) is the constant of integration. Thus, the solution is:
\[
\ln |y + 3| = x + C
\]
Exponentiating both sides:
\[
|y + 3| = e^{x + C} = e^C \cdot e^x
\]
Let \( e^C = A \), where \( A \) is a new constant. So, we have:
\[
|y + 3| = A e^x
\]
Since \( y + 3 \) is positive for all values of \( x \), we can drop the absolute value sign:
\[
y + 3 = A e^x
\]
Thus, the general solution is:
\[
y = A e^x - 3
\]
Step 1: Apply initial condition \( y(0) = 2 \)
Substitute \( x = 0 \) and \( y(0) = 2 \) into the general solution:
\[
2 = A e^0 - 3 \quad \Rightarrow \quad 2 = A - 3
\]
Thus, \( A = 5 \).
So, the solution becomes:
\[
y = 5 e^x - 3
\]
Step 2: Find \( y(\log 2) \)
Substitute \( x = \log 2 \) into the solution:
\[
y(\log 2) = 5 e^{\log 2} - 3
\]
Since \( e^{\log 2} = 2 \), we have:
\[
y(\log 2) = 5 \times 2 - 3 = 10 - 3 = 7
\]
Thus, the correct answer is \( 7 \).