Step 1: Recall what onto means.
A function is onto when every element of the final set (the codomain) gets hit by at least one input. We are told $gof$ is onto, and we must find what is forced to be true.
Step 2: Write the meaning of gof being onto.
For each $c$ in $C$, there is some $a$ in $A$ with \[ g(f(a)) = c \] So every $c$ in $C$ is reached.
Step 3: Rename the middle value.
Let $b = f(a)$. Since $f$ sends $A$ into $B$, this $b$ lives in $B$. So we can rewrite the line as $g(b) = c$.
Step 4: See what this says about g.
We just showed that for every $c$ in $C$ there is some $b$ in $B$ with $g(b)=c$. That is exactly the definition of $g$ being onto. So $g$ must be onto.
Step 5: Check if f must be onto.
Take $A=\{1\}$, $B=\{2,3\}$, $C=\{4\}$, with $f(1)=2$, $g(2)=4$, $g(3)=4$. Then $gof$ hits $4$, so it is onto, yet the element $3$ in $B$ is never used by $f$. So $f$ need not be onto.
Step 6: Pick the answer.
Only $g$ is forced to be onto. So the correct choice is \[ \boxed{g \text{ is onto}} \]