Okay, let's see. I need to find the sum of the roots of the function g(x), which is defined as f(x + 5). The original function f(x) is given as x³ - 49x² + 623x - 2015. Hmm, right. So first, maybe I should figure out what g(x) actually is. Since g(x) is f(x + 5), that means wherever there's an x in the original function f, I need to replace it with (x + 5). So substituting x + 5 into f(x) will give me g(x). Then, once I have g(x), I can find its roots and sum them up. 

Wait, but maybe there's a smarter way to do this without expanding the entire polynomial. Because expanding (x + 5)³ and all that might take time. Let me recall Vieta's formulas. For a cubic equation ax³ + bx² + cx + d = 0, the sum of the roots is -b/a. So if I can express g(x) in standard form, then the coefficient of x² will give me the sum of the roots when divided by the leading coefficient. 

So, since g(x) = f(x + 5) = (x + 5)³ - 49(x + 5)² + 623(x + 5) - 2015. Let me expand each term step by step. 

First, expand (x + 5)³. That's x³ + 15x² + 75x + 125. Then, expand -49(x + 5)². The square of (x + 5) is x² + 10x + 25, so multiplying by -49 gives -49x² - 490x - 1225. Next, expand 623(x + 5). That's 623x + 3115. Finally, the constant term is -2015. 

Now, let's combine all these expanded terms:

Starting with (x³ + 15x² + 75x + 125) + (-49x² - 490x - 1225) + (623x + 3115) - 2015.

Let me combine like terms step by step.

First, the x³ term: there's only one x³ term, which is x³.

Next, the x² terms: 15x² - 49x² = (15 - 49)x² = -34x².

Then, the x terms: 75x - 490x + 623x. Let's compute 75 - 490 + 623. 75 + 623 is 698, then subtract 490: 698 - 490 = 208. So 208x.

Now, the constant terms: 125 - 1225 + 3115 - 2015. Let's compute that. 125 - 1225 = -1100. Then, -1100 + 3115 = 2015. Then, 2015 - 2015 = 0. So the constant term is 0.

So putting it all together, g(x) = x³ - 34x² + 208x + 0, which simplifies to x³ - 34x² + 208x. 

Now, according to Vieta's formula, the sum of the roots of a cubic equation ax³ + bx² + cx + d = 0 is -b/a. Here, a is 1, b is -34. So the sum of the roots is -(-34)/1 = 34. Therefore, the sum of the roots of g(x) is 34. 

Wait, but let me double-check my calculations to make sure I didn't make any arithmetic errors. Let's verify each step.

First, expanding (x + 5)³: correct, it's x³ + 15x² + 75x + 125. Then, -49(x + 5)²: expanding (x + 5)² is x² + 10x + 25, multiplying by -49 gives -49x² - 490x - 1225. Correct. Then, 623(x + 5) is 623x + 3115. Correct. Then, subtracting 2015. 

Adding all terms: x³ + (15x² - 49x²) + (75x - 490x + 623x) + (125 - 1225 + 3115 - 2015). 

Calculating x² coefficients: 15 - 49 = -34. Correct. x coefficients: 75 - 490 = -415, then -415 + 623 = 208. Correct. Constants: 125 - 1225 = -1100, then -1100 + 3115 = 2015, then 2015 - 2015 = 0. Correct. So the polynomial is indeed x³ - 34x² + 208x. 

Therefore, the sum of the roots is -(-34)/1 = 34. That seems right. Alternatively, maybe there's another way to approach this problem without expanding. Let me think. Since g(x) = f(x + 5), and f(x) is a cubic polynomial. The roots of g(x) are the values of x for which f(x + 5) = 0. Let’s denote y = x + 5. Then, f(y) = 0 implies y is a root of f(y). So the roots of g(x) are y - 5, where y is a root of f(y). Therefore, if the roots of f(y) are r1, r2, r3, then the roots of g(x) are r1 - 5, r2 - 5, r3 - 5. Then, the sum of the roots of g(x) is (r1 - 5) + (r2 - 5) + (r3 - 5) = (r1 + r2 + r3) - 15. 

But Vieta's formula for f(y) = y³ - 49y² + 623y - 2015 gives the sum of roots r1 + r2 + r3 = 49. Therefore, the sum of the roots of g(x) is 49 - 15 = 34. This matches the previous result. So both methods give the same answer, which is reassuring. 

Therefore, the sum of the roots of g is 34. 

**Final Answer**
The sum of the roots of $g$ is $\boxed{34}$.
Therefore, the sum of the roots of $g$ is $\boxed{34}$.
</think>