We verify exactness at each of the three types of position.
Exactness at \(\pi_n(X, x_0)\text{.}\) First,
\(j_* \circ i_* = 0\) (i.e.,
\(\operatorname{im}(i_*) \subseteq \ker(j_*))\text{:}\) if
\(f \colon (I^n, \partial I^n) \to (A, x_0)\text{,}\) then
\(j_* i_* [f]\) is represented by
\(i \circ f\text{,}\) a map of triples whose image lies in
\(A\text{,}\) so it is trivial by the compression criterion. Conversely, suppose
\([f] \in \pi_n(X, x_0)\) with
\(j_*[f] = 0\text{,}\) i.e.,
\([f] \in \ker(j_*)\text{.}\) By the compression criterion,
\(f\) is homotopic rel
\(\partial I^n\) to a map
\(g\) with
\(g(S^{n-1}) \subseteq A\text{.}\) Since the homotopy fixes
\(\partial I^n\text{,}\) it is a based homotopy, so
\([f] = [i \circ g] = i_*[g]\) where
\([g] \in \pi_n(A, x_0)\text{.}\)
Exactness at \(\pi_n(X, A, x_0)\text{.}\) First, \(\partial \circ j_* = 0\text{:}\) if \(f \colon (I^n, \partial I^n) \to (X, x_0)\) then \(\partial j_* [f] = [f|_{I^{n-1}}] = [c_{x_0}]\text{,}\) because \(I^{n-1} \subseteq \partial I^n\) is mapped to \(x_0\text{.}\) Conversely, suppose \([f] \in \pi_n(X, A, x_0)\) satisfies \(\partial[f] = 0\text{.}\) Then \(f|_{I^{n-1}}\) is null-homotopic in \(A\) through based maps: there is \(H \colon I^{n-1} \times I \to A\) with \(H(-,0) = f|_{I^{n-1}}\text{,}\) \(H(-,1) = c_{x_0}\) and \(H(\partial I^{n-1} \times I) = \{x_0\}\text{.}\) Define \(g \colon I^n \to X\) by
\begin{equation*}
g(s_1, \ldots, s_n) =
\begin{cases}
H(s_1, \ldots, s_{n-1},\; 1 - 2s_n), & 0 \leq s_n \leq \tfrac{1}{2}, \\[4pt]
f(s_1, \ldots, s_{n-1},\; 2s_n - 1), & \tfrac{1}{2} \leq s_n \leq 1.
\end{cases}
\end{equation*}
This is continuous, since both formulas give \(f|_{I^{n-1}}\) at \(s_n = \tfrac12\text{.}\) We claim that \(g(\partial I^n) = \{x_0\}\text{:}\) on the bottom face \(s_n = 0\) we get \(H(-,1) = c_{x_0}\text{;}\) on the top face \(s_n = 1\) we get \(f(-,1) = c_{x_0}\text{,}\) as the top face lies in \(J^{n-1}\text{;}\) and on the side faces \(s_i \in \{0, 1\}\) with \(i < n\text{,}\) both \(H\) and \(f\) take the value \(x_0\text{,}\) since \(\partial I^{n-1} \times I \subseteq J^{n-1}\text{.}\) Thus \([g] \in \pi_n(X, x_0)\text{.}\) Finally, \(j_*[g] = [f]\text{:}\) the map
\begin{equation*}
G(s_1, \ldots, s_n, t) = g\Bigl(s_1, \ldots, s_{n-1},\; \frac{s_n + t}{1 + t}\Bigr)
\end{equation*}
is a homotopy from \(G(-,0) = g\) to \(G(-,1) = g(-, (s_n+1)/2) = f\text{.}\) It is a homotopy of triples: on the bottom face it takes values \(H(-, 1 - 2t/(1+t)) \in A\text{,}\) and on \(J^{n-1}\) it is constant at \(x_0\) by the computation of \(g\) on \(\partial I^n\) above. Here we used that the reparametrisation \(s_n \mapsto (s_n + t)/(1+t)\) is a self-map of \(I\) fixing \(1\text{.}\)
Exactness at \(\pi_{n-1}(A, x_0)\text{.}\) First,
\(i_* \circ \partial = 0\text{:}\) if
\(f \colon (I^n, \partial I^n, J^{n-1}) \to (X, A, x_0)\text{,}\) then
\(i_* \partial [f]\) is represented by
\(f|_{I^{n-1}}\text{,}\) viewed as a map into
\(X\text{.}\) Regarding
\(f\) as a map
\(I^{n-1} \times I \to X\) with
\(s_n\) as the homotopy parameter,
\(f\) itself is a based null-homotopy of
\(f|_{I^{n-1}}\) in
\(X\text{:}\) it is based because
\(\partial I^{n-1} \times I \subseteq J^{n-1}\text{,}\) and it ends at
\(f(-,1) = c_{x_0}\) because the top face lies in
\(J^{n-1}\text{.}\) Conversely, let
\([g] \in \pi_{n-1}(A, x_0)\) with
\(i_*[g] = 0\text{,}\) and let
\(H \colon I^{n-1} \times I \to X\) be a based null-homotopy of
\(i \circ g\text{,}\) so
\(H(-,0) = g\text{,}\) \(H(-,1) = c_{x_0}\) and
\(H(\partial I^{n-1} \times I) = \{x_0\}\text{.}\) Under the identification
\(I^{n-1} \times I = I^n\text{,}\) the map
\(H\) sends the distinguished face
\(I^{n-1} \times \{0\}\) to
\(g(I^{n-1}) \subseteq A\text{,}\) and sends
\(J^{n-1} = (I^{n-1} \times \{1\}) \cup (\partial I^{n-1} \times I)\) to
\(x_0\text{.}\) Hence
\(H\) is a map of triples,
\([H] \in \pi_n(X, A, x_0)\text{,}\) and
\(\partial[H] = [H|_{I^{n-1} \times \{0\}}] = [g]\text{.}\)