To solve the initial value problem, we start by separating the variables. This involves rearranging the given differential equation so that all terms involving \( y \) are on one side and all terms involving \( x \) are on the other side. Once separated, we integrate both sides to find the implicit solution. Finally, we use the initial condition \( y(1) = 3 \) to solve for the constant of integration.
To solve the differential equation \( x^2 \frac{dy}{dx} = \frac{2x^2 - x - 4}{(x+1)(y+1)} \), we first separate the variables. This involves rearranging the equation to isolate terms involving \( y \) on one side and terms involving \( x \) on the other side:
\[
(y+1) \, dy = \frac{2x^2 - x - 4}{x^2(x+1)} \, dx
\]
This matches option A from the multiple-choice answers.
Next, we integrate both sides of the separated equation:
\[
\int (y+1) \, dy = \int \frac{2x^2 - x - 4}{x^2(x+1)} \, dx
\]
The left side integrates to:
\[
\frac{y^2}{2} + y
\]
The right side requires partial fraction decomposition and integration, which results in:
\[
\ln |x| + \ln |x+1| + C
\]
We use the initial condition \( y(1) = 3 \) to solve for the constant \( C \). Substituting into the integrated equation:
\[
\frac{3^2}{2} + 3 = \ln |1| + \ln |1+1| + C
\]
\[
\frac{9}{2} + 3 = 0 + \ln 2 + C
\]
\[
\frac{15}{2} = \ln 2 + C
\]
Solving for \( C \), we find:
\[
C = \frac{15}{2} - \ln 2
\]
\(\boxed{\frac{y^2}{2} + y = \ln |x| + \ln |x+1| + \frac{15}{2} - \ln 2}\)