[guided]The long exact sequence of the pair turns relative vanishing into information about the inclusion-induced map on absolute homotopy groups. For the based inclusion
\begin{align*}
j: Y \hookrightarrow Z,
\end{align*}
the long exact homotopy sequence contains
\begin{align*}
\pi_{k+1}(Z,Y,y_0) \longrightarrow \pi_k(Y,y_0) \xrightarrow{j_*} \pi_k(Z,y_0) \longrightarrow \pi_k(Z,Y,y_0).
\end{align*}
First take $1 \leq k < n-1$. Then $k+1 \leq n-1$, so the previous step gives
\begin{align*}
\pi_{k+1}(Z,Y,y_0) = 0.
\end{align*}
It also gives
\begin{align*}
\pi_k(Z,Y,y_0) = 0.
\end{align*}
Exactness now says two things. Since the kernel of $j_*$ is the image of the zero group $\pi_{k+1}(Z,Y,y_0)$, the map $j_*$ is injective. Since the image of $j_*$ is the kernel of the map from $\pi_k(Z,y_0)$ to the zero group $\pi_k(Z,Y,y_0)$, the map $j_*$ is surjective. Hence $j_*$ is an isomorphism.
Now take $k = n-1$. The relevant exact segment is
\begin{align*}
\pi_{n-1}(Y,y_0) \xrightarrow{j_*} \pi_{n-1}(Z,y_0) \longrightarrow \pi_{n-1}(Z,Y,y_0).
\end{align*}
The previous step gives
\begin{align*}
\pi_{n-1}(Z,Y,y_0) = 0.
\end{align*}
Therefore the image of $j_*$ is the kernel of the zero map out of $\pi_{n-1}(Z,y_0)$, which is all of $\pi_{n-1}(Z,y_0)$. Thus $j_*$ is surjective.[/guided]