I have these algebra problems that I have been stuck on for over a week, and I'm beginning to fall behind. Any help will be much appreciated.

I am told to compute the following:
Let g(x) = 3x, and h(x) = x^2 + 1.

The first one was g(-1), and I got g(-1)=3(-1)=-3.

I'm now stuck on what g(g(-1)) and g(g(g(-1))) would be.

ok, I will do g(g(-1)), you do the last one

g(g(-1))
= g(-3)
= 3(-3) = -9

Thank you, I appreciate it!

Am I on the right track?

g(g(g(-1)))
= g(-9)
= 9(-9)(-9)=729

I'm going to try this again on my own, believe I did this wrong.

To compute g(g(-1)), you need to substitute g(-1) into the function g(x).

Given that g(x) = 3x, g(-1) is obtained by substituting -1 for x in the function. Therefore, g(-1) = 3(-1) = -3 (as you correctly calculated).

Now, substitute g(-1) = -3 back into the function g(x) to compute g(g(-1)):

g(g(-1)) = g(-3)

Since g(x) = 3x, substituting -3 for x yields:

g(g(-1)) = g(-3) = 3(-3) = -9

Now let's move on to g(g(g(-1))). We already know g(g(-1)) = -9 from the previous calculation.

To find g(g(g(-1))), substitute g(g(-1)) = -9 back into the function g(x):

g(g(g(-1))) = g(-9)

Again, using the fact that g(x) = 3x, substitute -9 for x:

g(g(g(-1))) = g(-9) = 3(-9) = -27

Therefore, g(g(g(-1))) = -27.

Remember, to compute expressions like g(g(-1)) and g(g(g(-1))), you substitute the values obtained from previous calculations back into the function g(x).