Chain homotopy inverse to inclusion
Write our chain complexes as
$C(K) = \cdots \to C_{n+1}(K) \to C_n(K) \to C_{n-1}(K) \to C_{n-2}(K) \to \cdots $
and
$C(L) = \cdots \to C_{n+1}(L) \to C_n(L) \to C_{n-1}(L) \to C_{n-2}(L) \to \cdots $
where $\sigma \in C_n(K)$ and $\tau \in C_{n-1}(K)$, but these are missing from $C_n(L)$ and $C_{n-1}(L)$, respectively (I am writing $\tau$ instead of $\sigma$').
Write $\partial$ for the boundary map in each complex (any ambiguity should be resolved from the context).
We are looking for a map $f: C_k(K) \to C_k(L)$ such that $i \circ f \sim id_{C(K)}$. To realise this homotopy, we need an additional map $h : C_k(K) \to C_{k+1}(K)$ such that $h \circ \partial + \partial \circ h = id_{C(K)} - i \circ f$. To introduce abbreviated notation, let us write this $h \partial + \partial h = 1 - if$.
So, how may we go about finding these maps $f$ and $h$? It suffices to define $f$ and $h$ on the simplices which generate these chain complexes. We want $f$ to be something like an inverse to $i$. Note $i$ is the identity on $C(L) \subseteq C(K)$, so it is reasonable to take $f$ to be the identity on $C(L)$ as well. Then on $C(L)$ we have $1 - if = 0$. Then it makes sense to choose $h = 0$ on $C(L)$. We will make sure this all works out in the end. But for now, it only remains to define $f$ and $h$ for $\sigma$ and $\tau$.
- How should we define $f(\sigma)$? It needs to in $C_n(L)$, which is generated by $n$-simplices that do NOT include $\sigma$. But, there is nothing in the problem setup that makes any reference to any other $n$-simplex, so really the only thing we can do is set $f(\sigma) = 0$.
- How should we define $h(\sigma)$? This one needs to be in $C_{n+1}(K)$ which is generated by the $(n+1)$-simplices. Again, we know nothing about these, so the only thing we can do is set $h(\sigma) = 0$.
It remains to think about defining $f(\tau)$ and $h(\tau)$. Note that $f(\tau)$ must be in $C_{n-1}(L)$, which is generated by the $(n-1)$-simplices not including $\tau$. Can we think of any such object? We know $\tau$ is in the boundary of $\sigma$, so $\partial(\sigma) = \tau + \rho$, with $\rho \in C_{n-1}(L)$. (Note we have chosen some orientation for $\sigma$ and $\tau$, which we fix from here on out.)
So we presume we should define $f(\tau) = \rho$ or perhaps some multiple of $\rho$. Let us solve the equations to see what works. Apply the homotopy equation $h \partial + \partial h = 1 - if$ to each of $\sigma$ and $\tau$. First apply to $\sigma$:
$$(h \partial + \partial h)(\sigma) = (1 - if)(\sigma)$$ $$ h(\partial(\sigma)) = \sigma ~~~\text{ since $f$ and $h$ both vanish on $\sigma$}$$ $$ h(\rho + \tau) = \sigma $$ $$ h(\tau) = \sigma ~~~ \text{ since $\rho \in C(L)$ where $h$ vanishes } $$
Well there's $h(\tau)$ for you! Now, apply to $\tau$: $$(h \partial + \partial h)(\tau) = (1 - if)(\tau)$$ $$ h(\partial(\tau)) + \partial(h(\tau)) = \tau - f(\tau) $$ $$ \partial(h(\tau)) = \tau - f(\tau) ~~~ \text{ since $\partial(\tau) \in C_{n-2}(K) = C_{n-2}(L)$ where $h$ vanishes} $$ $$ \partial(\sigma) = \tau - f(\tau) $$ $$ f(\tau) = \tau - \partial(\sigma) = -\rho$$
and there's $f(\tau)$ for you! As expected, it was a multiple of $\rho$.
In summary, you should choose $h(\tau) = \sigma$ and $0$ elsewhere, and $f(\tau) = \tau - \partial(\sigma)$, $f(\sigma) = 0$ and $f$ the identity elsewhere. Hopefully this gives some motivation for the choice. Now it just remains to verify that these actually work. This isn't too difficult.
So we have $f$ with $i \circ f \sim id_{C(K)}$. I should have also mentioned we need $f \circ i \sim id_{C(L)}$. Actually, the way we defined $f$, we have $f \circ i = id_{C(L)},$ so nothing more to check.