How can I solve $\int \frac{3x+2}{x^2+x+1}dx$ I want to compute this primitive $$I=\int \frac{3x+2}{x^2+x+1}dx.$$
I split this integral into two part:
$$\int \frac{3x+2}{x^2+x+1}dx=\int \frac{2x+1}{x^2+x+1}dx+\int \frac{x+1}{x^2+x+1}dx,$$
For the first part:
$$\int \frac{2x+1}{x^2+x+1}dx= \ln(|x^2+x+1|)+c_1$$
For the second part: due a change of variable $u=x+1$, I find
$$\int \frac{x+1}{x^2+x+1}dx= \int \frac{x+1}{x(x+1)+1}dx=\int \frac{u}{u(u-1)+1}dx=\dots$$

Hint:
There's no need to split the integral that way (IMO), we can instead write, $$\begin{align}
\int \frac{3x+2}{x^2+x+1}\,\mathrm dx&=\frac{3}{2}\int\frac{2x+\tfrac{4}{3}}{x^2+x+1}\,\mathrm dx\\
&=\frac32\int\dfrac{2x+1+\tfrac13}{x^2+x+1}\,\mathrm dx\\
&=\dfrac32\left(\int\dfrac{2x+1}{x^2+x+1}\,\mathrm dx+\int\dfrac{{\small 1/3}}{x^2+x+1}\,\mathrm dx\right).
\end{align}$$ The first one is obvious. For the second one we should complete the square in the denominator, like this,  $$\int\dfrac{1}{x^2+x+1}\,\mathrm dx=\int\dfrac{1}{\color{royalblue}{x^2+x+\tfrac14}+1-\tfrac14}\,\mathrm dx=\int\dfrac1{\color{royalblue}{\left(x+\tfrac1{2}\right)^2}+\tfrac34}\,\mathrm dx.$$ Now try to proceed further by rewriting that last expression so as to exploit the fact that the integral of $\frac{u'(x)}{u(x)^2+1}$ is $\arctan u(x)+\rm C$, you may have to factor something, and do one or more substitutions.
