Answer
$$6 x-14 \ln |x+3|+2 \ln |x-1|+C$$
Work Step by Step
Given $$\int \frac{\left(6 x^{2}+2\right) d x}{x^{2}+2 x-3}$$
By using long division, we get:
\begin{align*}
\frac{6 x^{2}+2}{x^{2}+2 x-3}&=6-\frac{12 x-20}{x^{2}+2 x-3}\\
&=6-\frac{12 x-20}{(x+3)(x-1)}
\end{align*}
and
\begin{align*}
\frac{12 x-20}{(x+3)(x-1)}&=\frac{A}{x+3}+\frac{B}{x-1}\\
&=\frac{A(x-1)+B(x+3)}{(x+3)(x-1)}\\
12 x-20&=A(x-1)+B(x+3)
\end{align*}
Then\begin{align*}
\text{at } x&=-3 \ \ \ \ \to A=14 \\
\text{at } x&= 1\ \ \ \ \to B=-2
\end{align*}
Hence
\begin{aligned}
\int \frac{6 x^{2}+2}{x^{2}+2 x-3} &=\int 6-\frac{14}{x+3}+\frac{2}{x-1} d x\\
&=\int 6 \, d x-14 \int \frac{1}{x+3} d x+2 \int \frac{1}{x-1} d x \\
&=6 x-14 \ln |x+3|+2 \ln |x-1|+C
\end{aligned}