Step 1: Rewriting the equation.
We are given the equation \( x^2 \frac{dy}{dx} = y^2 + xy \). First, we rearrange it to separate the variables:
\[
\frac{dy}{dx} = \frac{y^2 + xy}{x^2}
\]
We can now express this as:
\[
\frac{dy}{dx} = \frac{y(y + x)}{x^2}
\]
Step 2: Integrating both sides.
By solving this equation using the method of separation of variables, we get the integral:
\[
\int \frac{dy}{y(y + x)} = \int \frac{dx}{x}
\]
After solving this, we obtain the solution \( \frac{x}{y} + \log |x| = c \). This corresponds to option (A).
Step 3: Conclusion.
Thus, the correct solution is \( \frac{x}{y} + \log |x| = c \), making option (A) the correct answer.