Let $B(X)$ $=$ $\{$ $f:X\rightarrow \mathbb{R}$ $:$ $f$ is bounded $\}$. Show that if $X=$ $\{$ $1,2...,n$ $\}$. Then $B(X)$ $=$ $\mathbb{R}^n$.
My attempt:
If $g$ is a bounded function from $X$ to $\mathbb{R}$ then observe that $g(1)=x_1$, $g(2)=x_2$...., $g(n)=x_n$. Hence $g$ coincides with the vector in $\mathbb{R}^n$ with components $x_1,x_2...,x_n$. On the other hand, if $x \in \mathbb{R}^n$ then $x=(x_1,x_2...,x_n)$. Clearly then $x=f$ where $x_i=f(i)$. Since the domain is finite, $x\in B(X)$.
Is this correct?
The general idea of your answer is correct. But there is slightly confusing abuse of notation. Let $A(X)=\{f:X\to\mathbb{R}: f \text{ is bounded}\}$. Then $B(X)=\{Im(f): f\in A(X)\}$. Then we wish to show $B(X)=\mathbb{R}^n$.
Suppose there is a function $g$ such that $Im(g)\in B(X)$. Since $g\in A(X)$, we know $g$ is bounded so $Im(g)=(g(1),g(2),...,g(n))\in\mathbb{R}^n$. Since $g$ is arbitrary, we conclude $B(X)\subset \mathbb{R}^n$.
Conversely, suppose $y\in \mathbb{R}^n$. Define the function $g$ by $g(i)=y_i$ for all $i=1,...,n$. Then $g\in A(X)$ so $Im(g)\in B(X)$. Therefore, $\mathbb{R}^n\subset B(X)$.