I don't understand how the implication intruductions, the ones marked with the subscript $2 $ and $3 $ are used here. As I unerstand it, the implication introduction is used when we have a derivation from say $\phi $ to $\psi $, we can then discharge the assumption of $\phi $ and conclude $(\phi \to \psi )$. But here the derivation before the implication indruduction $2 $ doesn't start with $\top $, and the derivation that end in $\top $ before the implication indtroduction $3 $ does not start with $\neg \bot $. What is meant here?

Thanks in advance!
The first step ($\rightarrow I_1$ : top left) is :
i) $\bot$ --- assumed
ii) $\bot \vdash \bot$
iii) $\vdash \bot \rightarrow \bot$ --- from ii) by $\rightarrow$-Introduction
The second step ($\rightarrow I_2$ : bottom left) is only a "tricky" application of $\rightarrow$-Introduction : $A \vdash B \rightarrow A$.
To see that it is correct, we can use the Hilbert-style version of propositional logic.
It is a well-known fact that $A \rightarrow (B \rightarrow A)$ is a valid logic law (in classical logic, it is a tautology).
Intuitively, it is so becuase, if $A$ is true, then the conditional $B \rightarrow A$ is also true.
In the Hilbert-style version of propositional calculus this formula is often an axiom.
Thus, from $\vdash A \rightarrow (B \rightarrow A)$, if we assume $A$, then by modus ponens we can derive : $B \rightarrow A$.
The same fact can be "translated" into Natural Deduction with the possibility to "discharge" a formula $B$ whatever with an application of $\rightarrow$-Introduction :
Conclusion : apply it with $\lnot \bot$ as $A$ and $\top$ as $B$ to get :
The same for top right, with $(\rightarrow I_3)$.
Note
For an explanation, see Jan von Plato, Elements of Logical Reasoning (2013), page 22 :
In details, we have to compare the two following derivations :
i) $A$ - assumed
ii) $A \vdash A$
iii) $\vdash A \rightarrow A$ --- from ii) by $\rightarrow$-I.
i) $A$ - assumed
ii) $B$ --- assumed
iii) $A,B \vdash A$ --- from i) and ii)
iv) $A \vdash (B \rightarrow A)$ --- from iii) by $\rightarrow$-I
v) $\vdash A \rightarrow (B \rightarrow A)$ --- from iv) by $\rightarrow$-I.