Proposition 3.2.1.4. Let $f,g: X \rightarrow Y$ be morphisms of simplicial sets and let $K \subseteq X$ be a simplicial subset. Then:
The morphisms $f$ and $g$ are homotopic relative to $K$ if and only if there exists a sequence of morphisms $f = f_0, f_1, \ldots , f_ n = g$ from $X_{}$ to $Y_{}$ having the property that, for each $1 \leq i \leq n$, there exists either a homotopy from $f_{i-1}$ to $f_{i}$ which is constant along $K$, or a homotopy from $f_{i}$ to $f_{i-1}$ which is constant along $K$.
Suppose that $Y_{}$ is a Kan complex. Then $f$ and $g$ are homotopic relative to $K$ if and only if there exists a homotopy from $f$ to $g$ which is constant along $K$.