Definition of surjective:
Let $X$ and $Y$ be sets and let $f:X\to Y$ be a function. $f$ is surjective if for each $y\in Y$ there is some $x\in X$ such that $f(x)=y$
Solution attempt:
$$g(x) = x^3$$ $$f: \Bbb R \to \Bbb R$$
Take any $y \in \Bbb R$. Then there exists $x\in X$ s.t x is $\sqrt[3]{y}$ (cube root of $y$). Since cube root is a function on $\Bbb R \to \Bbb R$, $g$ is surjective.
Is this proof correct? Otherwise can you please comment on what's wrong or any improvements for making it more rigurous?
Let me summarize some of the comments as an answer.
The logic in your proof is correct. As an answer to an exercise in an elementary set theory class I would accept it.
I would change some wording: what makes this work is not that "cube root is a function" but that every real number has a real cube root. In a calculus class or a class on real analysis you would have to explain why that is true.