Let $X,Y$ be a path-connected space, $f: X \to Y$ be a continuous map and $C_f$ be a mapping cone(https://en.wikipedia.org/wiki/Mapping_cone_(topology)). If $π_1(Y) = 0$ then $π_1(C_f) = 0$.
The answer on the text book is as follows.
Let $U = Y \cup (X \times (\frac{1}{2},1]), V = X\times [0,1)$. $V$ is contractible. Apply Seifert–van Kampen theorem to $U$ and $V$ and get result.
I understand $π_1(U) = π_1(Y)*π_1(X)*π_1((\frac{1}{2},1]) = π_1(X), π_1(V) = π_1(X)$. However, I have no idea from here.