Step 1: Rewrite the given equation
The given differential equation is:
\[
(y^2 + x + 1) dy = (y + 1) dx.
\]
Rearrange it as:
\[
\frac{dy}{dx} = \frac{y+1}{y^2 + x + 1}.
\]
Step 2: Use variable separable method
Rewriting,
\[
\frac{y^2 + x + 1}{y+1} dy = dx.
\]
Separate the variables:
\[
\left( \frac{y^2}{y+1} + \frac{x+1}{y+1} \right) dy = dx.
\]
Integrating both sides:
\[
\int \left( y - 1 + \frac{x+2}{y+1} \right) dy = \int dx.
\]
Step 3: Solve the integral
Solving,
\[
\frac{x+2}{y+1} \log(y+1)^2 = y + c.
\]
Step 4: Final Answer
Thus, the general solution of the given differential equation is:
\[
\boxed{\frac{x+2}{y+1} \log(y+1)^2 = y + c}.
\]