The question is ambiguous; it could be:
3(x+2)+(4(x+5)/(x+7))=5.
Let's try to solve this.
First we multiply through by x+7:
3(x+2)(x+7)+4(x+5)=5(x+7).
Now expand all the brackets:
3x^2+27x+42+4x+20=5x+35.
Gather like terms together:
3x^2+26x+27=0.
This does not factorise. The roots are irrational but can be found using the quadratic formula.
Let's try another interpretation:
(3(x+2)+4(x+5))/(x+7)=5.
Expand the brackets:
(3x+6+4x+20)/(x+7)=5
(7x+26)/(x+7)=5
Multiply through by (x+7):
7x+26=5x+35 so 2x=9 and x=9/2=4½ or 4.5.