Deriving the long exact sequence of a pair $(X,A)$ from the Mayer-Vietoris sequence
Let $CA = \frac{A \times [0,1]}{A \times \{1\}}$, and let $q:A \times [0,1] \rightarrow CA$ be the quotient map. Consider the space $X \cup CA$ identifying $a \in A$ with $[a,0] \in CA$. Consider the open sets $U := X \cup q(A \times [0,\epsilon))$ and $V := q(A \times (\frac{\epsilon}{2},1])$ for $0 < \epsilon < 1$. Note that $X \cup CA = \text{int}(U) \cup \text{int}(V) = U \cup V$, $U$ is homotopy equivalent to $X$, $V$ is homotopy equivalent to a point (the vertex of $CA$), and $U \cap V$ is homotopy equivalent to $A$. Since homotopy equivalences induce isomorphisms in reduced homology groups for all degrees, the reduced homology groups of a point are all trivial, and $H_n(X,A) = \tilde{H}_n(X,A)$ for all $n$ and nonempty $A$, by the Mayer-Vietoris sequence for reduced homology applied to $X \cup CA$ and $H_n(X,A) \cong \tilde{H}_n(X \cup CA)$ for all $n$, we have the long exact sequence \begin{align*} \cdots \rightarrow \tilde{H}_n(A) \rightarrow \tilde{H}_n(X) \rightarrow \tilde{H}_n(X,A) \rightarrow \tilde{H}_{n-1}(A) \rightarrow \cdots \rightarrow \tilde{H}_0(X,A) \rightarrow 0. \end{align*}
We've now derived the long exact sequence of reduced homology groups of a pair $(X,A)$. It only remains to go further to obtain the long exact sequence of ordinary homology groups.