Answer
$$\frac{e^{3 x}(x-2)^{2}}{(x+1)^{2}} \left(3+\frac{2}{ x-2} -\frac{2}{ x+1}\right)$$
Work Step by Step
Given $$y=\frac{e^{3 x}(x-2)^{2}}{(x+1)^{2}}$$
Since
\begin{align*}
\ln y&=\ln \frac{e^{3 x}(x-2)^{2}}{(x+1)^{2}}\\
&=\ln( e^{3 x}(x-2)^{2})-\ln((x+1)^{2})\\
&= \ln( e^{3 x} )+2\ln( x -2 )-2\ln( x+1 )
\end{align*}
Differentiate both sides
\begin{align*}
\frac{1}{y}y'&= \frac{1}{e^{3x}}3e^{3x}+\frac{2}{ x-2} -\frac{2}{ x+1} \\
&= 3+\frac{2}{ x-2} -\frac{2}{ x+1} \\
y'&=\frac{e^{3 x}(x-2)^{2}}{(x+1)^{2}} \left(3+\frac{2}{ x-2} -\frac{2}{ x+1}\right)
\end{align*}