I was a little confused so I solve it two different ways and got different answers so pls read through this carefully
Substitute a+2 instead of x
That would look something like: 3(a+2)+5/a+2
Now simplify:
3a+6+5/a+2
3a+11/a+2
3(a+2) +5/(a+2)
3a+6 + 5/(a+2)
LCM: (3a(a+2) + 6(a+2) +5)/a+2
So your answer will be (3a^2 + 12a + 17)/(a+2)
I hope this helps :)