(6x+2)/(x^2+3x+2)=5-(2x^2+6x+4)/(3x+1)
2(3x+1)/(x^2+3x+2)+2(x^2+3x+2)/(3x+1)-5=0
设(3x+1)/(x^2+3x+2)=y
则2y+2/y-5=0
2y^2-5y+2=0
(2y-1)(y-2)=0
解得y=1/2或y=2
则(3x+1)/(x^2+3x+2)=1/2或(3x+1)/(x^2+3x+2)=2
即x^2+3x+2=6x+2或2x^2+6x+4=3x+1
x^2-3x=0或2x^2+3x+3=0
解得x=0或x=3
综上可得方程解为x=0或x=3