using division rule,
Dividend $=$ Quotient $\times$ Divisor $+$ Remainder
$\therefore 3 x^{3}+x^{2}+2 x+5=(3 x-5) g(x)+9 x+10$
$\Rightarrow 3 x^{3}+x^{2}+2 x+5-9 x-10=(3 x-5) g(x)$
$\Rightarrow 3 x^{3}+x^{2}-7 x-5=(3 x-5) g(x)$
$\Rightarrow g(x)=\frac{3 x^{3}+x^{2}-7 x-5}{3 x-5}$
$3 x-5 \quad \frac{x^{2}+2 x+1}{3 x^{3}+x^{2}-7 x-5}{3 x^{3}-5 x^{2}}$
$6 x^{2}-10 x$
$3 x-5$