how to do this question plz answer

Answer:
see below
Step-by-step explanation:
[tex]\frac{3x^2+7x+4}{x^2+3x+2}\\\\=\frac{(3x+4)(x+1)}{(x+2)(x+1)}\\\\=\frac{3x+4}{x+2}\\\\[/tex]
and the other
[tex]\frac{x^2-2x-8}{3x^2+7x+2}\\\\=\frac{(x-4)(x+2)}{(3x+1)(x+2)}\\\\=\frac{x-4}{3x+1}[/tex]