How to find f o g and g o f with given points?

how to find f o g and g o f with given points?