Let $5 x-2=A \frac{d}{d x}\left(1+2 x+3 x^{2}\right)+B$
$\Rightarrow 5 x-2=A(2+6 x)+B$
Equating the coefficients of $x$ and the constant term on both sides,we obtain:
$5=6 A \Rightarrow A=\frac{5}{6}$
$2 A+B=-2 \Rightarrow B=-2-2\left(\frac{5}{6}\right)=-2-\frac{5}{3}=-\frac{11}{3}$
$\therefore 5 x-2=\frac{5}{6}(2+6 x)-\frac{11}{3}$
$\Rightarrow \int \frac{5 x-2}{1+2 x+3 x^{2}} d x=\int \frac{\frac{5}{6}(2+6 x)-\frac{11}{3}}{1+2 x+3 x^{2}} d x$
$=\frac{5}{6} \int \frac{2+6 x}{1+2 x+3 x^{2}} d x-\frac{11}{3} \int \frac{1}{1+2 x+3 x^{2}} d x$
Let $I_{1}=\int \frac{2+6 x}{1+2 x+3 x^{2}} d x$ and $I_{2}=\int \frac{1}{1+2 x+3 x^{2}} d x$
$\therefore \int \frac{5 x-2}{1+2 x+3 x^{2}} d x=\frac{5}{6} I_{1}-\frac{11}{3} I_{2} \quad \dots(1)$
For $I_{1}$,let $1+2 x+3 x^{2}=t$,then $(2+6 x) d x=d t$
$I_{1}=\int \frac{d t}{t}=\log |t|=\log |1+2 x+3 x^{2}| \quad \dots(2)$
For $I_{2}$,$1+2 x+3 x^{2}=3\left(x^{2}+\frac{2}{3} x+\frac{1}{3}\right)=3\left(\left(x+\frac{1}{3}\right)^{2}+\frac{2}{9}\right)=3\left(\left(x+\frac{1}{3}\right)^{2}+\left(\frac{\sqrt{2}}{3}\right)^{2}\right)$
$I_{2}=\frac{1}{3} \int \frac{d x}{\left(x+\frac{1}{3}\right)^{2}+\left(\frac{\sqrt{2}}{3}\right)^{2}}=\frac{1}{3} \cdot \frac{3}{\sqrt{2}} \tan ^{-1}\left(\frac{x+1/3}{\sqrt{2}/3}\right)=\frac{1}{\sqrt{2}} \tan ^{-1}\left(\frac{3 x+1}{\sqrt{2}}\right) \quad \dots(3)$
Substituting $(2)$ and $(3)$ into $(1)$:
$\int \frac{5 x-2}{1+2 x+3 x^{2}} d x=\frac{5}{6} \log |1+2 x+3 x^{2}|-\frac{11}{3 \sqrt{2}} \tan ^{-1}\left(\frac{3 x+1}{\sqrt{2}}\right)+C$