$X \subset \mathbb{R}^n$ bounded $\implies f(X)$ is Bounded
What you have done seems fine (except that the target space of $g$ should be $\Bbb{R}$, which I guess is a typo).
Alternatively, do you know the property that $\overline{X}$ is the smallest closed set containing $X$? Because if you do, $X$ bounded implies $X$ is contained inside a ball $B_K$ for some $K>0 $, which is a closed set, and hence contains $\overline{X}$ as well. Then, after this you can make use of the compactness argument as you have done.
Edit:
As suggested in the comments, the mere fact that $X$ is bounded means by definition that it lies inside some closed ball (which is compact). Then we can apply the compactness argument to the closed ball. So, this shortens the proof even more. (Of course this only works in finite-dimensional vector spaces due to Heine-Borel theorem and not in arbitrary metric spaces)
You should take note of a similar sounding statement which is false:
Let $X \subseteq \Bbb{R}^m$ be a bounded set, and $f:X \to \Bbb{R}^n$ be continuous. Then, $f(X)$ is bounded.
This statement is definitely false. As a counterexample, let $m=n=1$, and let $X= (-\frac{\pi}{2}, \frac{\pi}{2})$, and define $f: X \to \Bbb{R}$, by $f(x) = \tan(x)$. Then, the image of $f$ is $\Bbb{R}$, which is clearly unbounded. The reason for this difference is that in this example, $f$ is only continuous on $X$, whereas in your original question, $f$ is assumed to be continuous on the entire $\Bbb{R}^m$ (actually all we need is for $f$ to have a continuous extension to $\overline{X}$).