I understand that g◦f is g(f(x)). So if g◦f is injective then every element of A matches to an element of C. Then every element of A has to match to B and therefore f is injective. And for the other part, since g◦f is surjective then every element in C is the image of something in A. Then g is surjective since every element in C is the image of something in B and every element in B is the image of something in A.
I don't know if this will make any since.