Calculating g(f(-1)):
The steps are marked in the headings and in the table below:
Step 1: Finding the given input -1 in the input column x
The row is the second row.
Step 2: Finding the output value that corresponds to the input -1 in the column of the inner function f(x).
The column is the third column and the output is f(-1) is 2.
Step 3: Finding the output 2 in the input column x
The row is the fifth row.
Step 4: Finding the output value in the column of the outer function g(x)
The column of the outer function g(x) is the second column. The input of the inner function f(-1)=2 is located in the fifth row therefore the output of the outer function f(x) is 4.
The answer is g(f(-1))=4.