Corrected 2 December 2021.
Suppose that $f$ is not continuous. Then there are a point $x\in A$, an $\epsilon>0$, and a sequence $\langle x_n:n\in\Bbb N\rangle$ in $A$ converging to $x$ such that $\left|f(x_n)-f(x)\right|\ge\epsilon$. (Why?) Let $G$ be the graph of $f$. Then $\big\langle\langle x_n,f(x_n)\rangle:n\in\Bbb N\big\rangle$ is a sequence in the compact metric space $G$, so it has a convergent subsequence $\big\langle\langle x_{n_k},f(x_{n_k})\rangle:k\in\Bbb N\big\rangle$.
Show that the limit of this subsequence must be of the form $\langle x,\alpha\rangle$ for some $\alpha\in\Bbb R$. (Recall that $x$ is the limit of $\langle x_n:n\in\Bbb N\rangle$.)
Show that $\alpha\ne f(x)$. Conclude that $\langle x,\alpha\rangle\notin G$.
This contradicts the compactness of $G$; how?
You'll first need the lemma:
Every bounded sequence in $\mathbb R$ has a Cauchy sub-sequence.
Then if $f:\mathbb R\to\mathbb R$ is continuous, and $X\subset[a,b]$ is closed, then if $f$ is not bounded on $X$, find $x_n\in X$ so that $|f(x_n)|>n$. Then $\{x_n\}$ has a Cauchy sub-sequence, which must converge to a value in $X$ since $X$ is closed. But then $f(x_n)\to x$. Is that possible?
To prove that $f(X)$ is closed, you do likewise. If $y$ is a limit point of $f(X)$, let $x_1,x_2,\dots,x_n,\dots\in X$ so that $f(x_n)\to y$. Then take a Cauchy sub-sequence of $\{x_1,\dots,x_n,\dots\}$.
The proof of the lemma:
Given an infinite sequence $\{x_1,x_2,\dots\}\subseteq [a_0,b_0]$. Set $n_0=1$.
Given $n_k,a_k,b_k$ with infinitely many elements of the $x_i$ in $[a_k,b_k]$, we split the interval in half.
If there are infinitely many $x_i\leq \frac{a_k+b_k}{2}$, we let $a_{k+1}=a_k, b_{k+1}=\frac{a_k+b_k}{2}$.
Otherwise, choose $a_{k+1}=\frac{a_k+b_k}{2}$ and $b_{k+1}=b_k$.
In either case, there are infinitely many $x_i$ in $[a_{k+1},b_{k+1}]$. Choose $n_{k+1}$ so that $n_{k+1}> n_k$ and $x_{n_{k+1}}\in [a_{k+1},b_{k+1}]$.
By induction, since $[a_{k+1},b_{k+1}]\subset [a_k,b_k]$ we have that if $i\geq k$ then $x_{n_i}\in [a_k,b_k]$.
Now $b_k-a_k=\frac{b_0-a_0}{2^k}$ so if $i,j\geq k$, then $|x_{n_i}-x_{n_j}|\leq \frac{b_0-a_0}{2^k}$. This shows that $\{x_{n_i}\}$ is Cauchy.
Best Answer
For closure what you want to show is that if $f(x_n) \to L$ then $L \in f(S)$.
This is meaningless to me. $f(s^*)$ is constant it does not "tend to" anything.
Why not, exactly? This is, after all, what you are trying to prove and just stating that it's true is not a proof.
I think the better way to look at this is through the Bolzano-Weierstrass theorem. To show $f(S)$ is compact you need to show that every sequence $y_n = f(x_n)$ has a convergent subsequence and here you can use a convergent subsequence of $x_n$ to reach that conclusion.