Consider the following extension problem: given a normed linear space $X$ subspace $M\subseteq X$ (not necessarily closed) and a bounded linear functional $f\colon M\to\mathbb{R}$, $$\text{find}\quad F\in X^*\quad\text{such that}\quad \tag1 \begin{cases} F_{|M}=f \\ \lVert F\rVert_*= \lVert f\rVert & \end{cases}$$
Observe that a bounded linear functional $f$ defined on a subspace $M$ can be uniquely extended to the closure $\overline{M}$ by a standard completeness argument. Indedd, let $\overline{x}\in\overline{M}$ and let $(x_n)\subseteq M$ be such that $x_n\to \overline{x}$. Since $$|f(x_n)-f(x_m)|\le \lVert f\rVert_*\lVert x_n-x_m\rVert$$ $(f(x_n))$ is a Cauchy sequence in $\mathbb{R}$. So $(f(x_n))$ is convergent. Then it is easy to verify that $F(\overline{x}):=\lim_nf(x_n)$ is the required extension of the given functionl $f$ and $\lVert F\rVert_*=\lVert f\rVert_*$.
In fact, let $x\in M\subseteq \overline{M}$ then $$F(x):=\lim_n f(x_n)=f(x),$$ where $x_n=x$ for all $n\in\mathbb{N}$, furthermore $$\lVert f\rVert_*=\sup_{x\in M, \lVert x\rVert=1}|f(x)|\le\sup_{x\in\overline{M}, \lVert x\rVert=1} |F(x)|=\lVert F\rVert_*$$ How can I proceed to show that $$\color{red}{\lVert F \rVert_*\le \lVert f \rVert_*}$$
Now, we suppose that $X$ is an Hilbert space. Let us still denote by $f$ the extension of the given functional to the closure $\overline{M}$, obtained by the procedure described above. Note that $\overline{M}$ is a Hilbert space. So, by Riesz Theorem, there exists a unique vector $y_f\in\overline{M}$ such that $\lVert y_f\rVert= \lVert f\rVert_*$ and $$f(x)=(x, y_f)\quad\forall x\in\overline{M}.$$
Define $$F(x)=(x,y_f)\quad\forall x\in X$$
Then $F\in X^*$, $F_| M=f$ and $\lVert F\rVert_*=\lVert y_f\rVert=\lVert f\rVert_*$. We claim that $F$ is the unique extension of $f$ with therse properties. Indeed, let $G$ be another solution of the problem $(1)$ and let $y_G$ be the vector in $X$ associated with $G$ in the Riesz representation. Consider the Riesz orthogonal decomposition of $y_G$, that is,$$ y_G=y'_G+y''_G\;\text{where}\;y'_G\in\overline{M}\;\text{and}\; y''_G\in \overline{M}^{\perp}.$$ Then $$(x,y'_G)=G(x)=f(x)=(x,y_f)\;\text{for all}\; x\in\color{red}{\overline{M}}$$
My book writes $\color{red}{\overline{M}}$, but in my opinion is $\color{red}M$ who is right? Thanks!
For your first question, I suggest to pass to the limit in the inequality $\| f(x_n) \| \leq \| f \|_\ast \| x_n \|$, where $x_n \in M$ and $x_n \rightarrow x \in \overline{M}$, to find that $\forall x \in \overline{M}, \| F(x) \| \leq \| f\|_\ast \| x \|$ which finally implies that $\| F \|_\ast \leq \| f \|_\ast$.
The same idea applies here, I agree that it is first straightforward that the equality holds for $x \in M$, but a $x \in \overline{M}$ is a limit of $(x_n) \subset M$ and you can pass to the limit in the equality has $x \in X \mapsto (x, y)$ is coninuous for all $y \in X$.
I hope it helped