Basically, here you have to follow a trail. Take 1 and see where it is mapped to, then look at 2, then 3 then 4. In g(f(x)) we apply f to x and then we apply g to the result. So, if x is 1 then f(x) is 3 and g(f(x)) is 1. Similarly, 2 is sent to 1. Thus, ( ). Can you see how to find and ?