Using your "x" values in the table, you can find (fog) and (gof).

For example, if you have a table that reads: x | 3 4 5 6 7 8 9

f | 1 5 7 4 2 7 3

g | 4 1 2 5 3 6 8

If you have (gof)(3) or (fog)(2), to find (gof)(3) you have to write each.

For example, (gof)(3) = g(f(3)) = g(7) = 8. In this example, the function of f(3) = 7 (as shown in the table above), therefore we can write it as g(7), and if we look in the 7th column of the "g" row, we can find that g(7) = 8, thereofre (gof)(3) = 8.

For (fog)(2), we know the function of f(g(2)) = 1, which means the function of f(1) = 1. Again, we take the amount from the g row but this time in the 2nd column, which is 1. So, our f function is expressed as f(1) and when we solve for it, the f row in the first column has a value of 1, therefore (fog)(2) = 1.