There are a couple ways we can solve this:
1. We can plug in g into f and then make x = 5
![3x+10\\3(x-2)+10\\3x-6+10\\3x+4\\plug.in.5\\3(5)+4\\15+4\\19](https://img.qammunity.org/2020/formulas/mathematics/middle-school/nw1k6n53jaa9nufsqkj4tj00yr2ry0npqu.png)
So f(g(5)) = 19
2. We can plug in g pre-solved with x = 5 into f
![x-2\\5-2\\3\\plug.in.3.into.f\\3x+10\\3(3)+10\\9+10\\19](https://img.qammunity.org/2020/formulas/mathematics/middle-school/zxwxu6yzw6xiskq6enn21i3xue5w9rntbo.png)
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.