Here, f = {(3,a),(4,b),(7,c)}. i.e., f(3) = a, f(4) = b and f(7) = c
Also, g = {(x,3),(y,4),(z,7)}. i.e., g(x) = 3, g(y) = 4 and g(z) = 7
Now,
fog = f(g(x))
So, f(g(x)) = f(3) = a
f(g(y)) = f(4) = b
f(g(z)) = f(7) = c
Hence the ordered pair representing fog = {(x,a),(y,b),(z,c)}
The function diagram