Essentially, theorem II.7.6 of Hartshorne proves that a line bundle $\mathscr{L}$ is ample if and only if $\mathscr{L}^{\otimes n}$ is very ample for some $n$. My confusion is mostly about the definition of an immersion used in the proof.
In the first part, we assume $\mathscr{L}^n$ on a noetherian $A$-scheme $X$ is very ample and we use the fact that $X \cong U \subseteq Z \subseteq \mathbb{P}^m_A$ where the first inclusion is an open immersion and the second is a closed immersion. This definition is essential because we require that a coherent sheaf on $X$ extends to all of $Z$. This theorem (exercise II.5.15) is about extending a coherent sheaf from an open subset so the fact that the first inclusion is an open immersion is essential.
Later in the proof, he shows that $\mathscr{L}^n$ is very ample by showing that it gives rise to a morphism $X \to \mathbb{P}^N_k$ which factors into $X \to \bigcup_{i = 1}^l U_i \to \mathbb{P}^N_k$ where $U_i$ are open subsets of some $\mathbb{P}^N_A$ and the first map is a closed immersion.
What is going on here? It seems that there are different definitions of an immersion being used here. Are they used interchangeably or is this a mistake of Hartshorne's? I am very confused because it seems that two different(non-equivalent) definitions are being used in the same proof.
I will also add that Hartshorne defines an immersion $X \to Z$ to be a map which induces an isomorphism of '$X$ with an open subscheme of a closed subscheme of $Z$.'
Thank you for any help!