The proof is incorrect as it is. Using $\to$ Intro after the outside subproof will get you $(P \to P) \to (P \to P)$, rather than $P \leftrightarrow P$
To get $P \leftrightarrow P$, you have to do a subproof that assumes $P$ and that concludes $P$ (this takes either a Reiteration of $P$, or you can just close the subproof immediately after assuming $P$.
Then, depending on how the $\leftrightarrow$ Intro rule is defined, you either conclude $P \to P$ using $\to$ Intro, and then point to this statement twice, or point to the subproof twice.
The proof is incorrect as it is. Using $\to$ Intro after the outside subproof will get you $(P \to P) \to (P \to P)$, rather than $P \leftrightarrow P$
To get $P \leftrightarrow P$, you have to do a subproof that assumes $P$ and that concludes $P$ (this takes either a Reiteration of $P$, or you can just close the subproof immediately after assuming $P$.
Then, depending on how the $\leftrightarrow$ Intro rule is defined, you either conclude $P \to P$ using $\to$ Intro, and then point to this statement twice, or point to the subproof twice.