There are a couple ways we can solve this:
1. We can plug in g into f and then make x = 5
[tex]3x+10\\3(x-2)+10\\3x-6+10\\3x+4\\plug.in.5\\3(5)+4\\15+4\\19[/tex]
So f(g(5)) = 19
2. We can plug in g pre-solved with x = 5 into f
[tex]x-2\\5-2\\3\\plug.in.3.into.f\\3x+10\\3(3)+10\\9+10\\19[/tex]
So again, f(g(5)) = 19
As you can see, either way works fine. it just depends on what makes more sense to you personally.