Answer
$$3\left(\ln |x|-\ln |x+1|+\frac{1}{(x+1)}\right)+C$$
Work Step by Step
Given $$ \int \frac{3 d x}{(x+1)\left(x^{2}+x\right)}$$
Since
\begin{aligned}
\frac{3}{(x+1)\left(x^{2}+x\right)} &=\frac{3}{x(x+1)(x+1)} \\
&=\frac{3}{x(x+1)^{2}} \\
&=\frac{A}{x}+\frac{B}{(x+1)}+\frac{C}{(x+1)^{2}} \\
&=\frac{A(x+1)^{2}+B \cdot x(x+1)+C x}{(x+1)\left(x^{2}+x\right)}\\
3 &=A(x+1)^{2}+B \cdot x(x+1)+C x
\end{aligned}
Then
\begin{align*}
\text{at }x&=\ \ \ \ \to \ \ \ \ \ A= 3\\
\text{at }x&=\ \ \ \ \to \ \ \ \ \ B= -3\\
\text{at }x&=\ \ \ \ \to \ \ \ \ \ C= -3
\end{align*}
Hence
\begin{aligned}
\int \frac{3 d x}{(x+1)\left(x^{2}+x\right)} &=\int \frac{3 d x}{x}-\int \frac{3 d x}{(x+1)}-\int \frac{3 d x}{(x+1)^{2}} \\
&=3 \int \frac{d x}{x}-3 \int \frac{d x}{(x+1)}-3 \int(x+1)^{-2} d x\\
&=3\left(\ln |x|-\ln |x+1|+\frac{1}{(x+1)}\right)+C
\end{aligned}