f is one-one
If f(x1)=f(x2)
then x1=x2
g is one-one
If g(x1)=g(x2)
then x1=x2
Suppose g.f(x1)=g.f(x2)
As g is one-one.
So,f(x1)=f(x2)
As f is one-one.
x1=x2
Hence,g.f is one-one.
Since g:B→C is onto
Suppose z∈C, then there exists a pre-image in B
Let the pre-image be y
Hence, y∈B such that g(y)=z
Similarly,Since f:A→B is onto
If y∈B, then there exists a pre-image in A
Let the pre-image be x
Hence, x∈A such that f(x)=y
Now,g.f=g(f(x))=g(y)=z
So, for every x in A, there is an image z in C, thus,
gof is onto.