The standard play to verify "onto" when at the element level of functions is to pick something in the range and verify that something in the domain is mapped to it.
Since the only thing you can say about an onto function is that every element of the range is actually taken by the function for something (possibly more than one something) in the domain. Thus $ f: X \rightarrow Y$ surjective means $$\forall y \in Y, \exists x \in X \text{ such that } f(x) = y$$ Similarly $ g: Y \rightarrow Z$ surjective means $$\forall z \in Z, \exists y \in Y \text{ such that } g(y) = z$$
What you want to know is $$\forall z \in Z, \exists x \in X \text{ such that } g \circ f(x) = z$$ To check this, pick some $z \in Z$. Show there's some $y \in Y$ such that $g(y) = z$. Now show there's some $x \in X$ such that $f(x) = y$. Put those together and show $g(f(x)) = g(y) = z$. Then you've shown each thing in $Z$ has something in $X$ that is (eventually) mapped to it by $g \circ f$.