Let $\frac{3x-1}{(x+2)^{2}} = \frac{A}{(x+2)} + \frac{B}{(x+2)^{2}}$
Multiplying both sides by $(x+2)^{2}$,we get:
$3x-1 = A(x+2) + B$
Equating the coefficients of $x$ and the constant terms:
$A = 3$
$2A + B = -1$
Substituting $A = 3$ into the second equation:
$2(3) + B = -1 \Rightarrow 6 + B = -1 \Rightarrow B = -7$
Thus,$\frac{3x-1}{(x+2)^{2}} = \frac{3}{(x+2)} - \frac{7}{(x+2)^{2}}$
Integrating both sides with respect to $x$:
$\int \frac{3x-1}{(x+2)^{2}} dx = 3 \int \frac{1}{x+2} dx - 7 \int (x+2)^{-2} dx$
$= 3 \log |x+2| - 7 \left( \frac{(x+2)^{-1}}{-1} \right) + C$
$= 3 \log |x+2| + \frac{7}{x+2} + C$
Where $C$ is the constant of integration.