Let $\mathbb{P}$ be poset.
Let $B$ be a set. We say that a $\mathbb{P}$-name is a nice name for member of $B$ if there is a maximal antichain $A\subseteq\mathbb{P}$ and a function $h:A\rightarrow{B}$ such that $ p\Vdash\dot{b}=h(p)$ for all $p\in{A}$. Here, we abuse of the notation and say $\dot{b}=\left<{A,h}\right>$ .
I am studying the concepts of name and nice name but I'm confused.
Give a maximal antichain $A$ and a function $h:A\rightarrow{B}$, as I can build construct a name $\dot{b}$ such that $\dot{b}=\left<{A,h}\right>$?.
That you can do this is a special case of the mixing lemma:
Both Jech (Lemma 14.18) and Kunen (Lemma VIII.8.1) give proofs, but neither calls it by this name.
Your specific case is a bit easier to grasp than the general situation. Intuitively it is quite clear that you would want to build a name which looks something like $$\tau=\{\langle h(p),p\rangle;p\in A\}$$ (where I omitted the checks in the first component). This is a name but, unfortunately, it names the singleton of the name we want, i.e. we get $\Vdash \tau=\{\langle A,h\rangle\}$. To fix this we go one level deeper and let $$\langle A,h\rangle=\bigcup_{p\in A}\{\langle \check{x},p\rangle;x\in h(p)\}$$ You can check that this gives the desired name.