This is a question about an exercise in William Massey’s A Basic Course in Algebraic Topology. Chapter VII, Question 5.2.
Let $X_i$ be the pathwise-connected components of $X$, show that $H_n(X,A)$ is isomorphic to the direct sum of all the groups $H_n(X_i,A \cap X_i)$.
I can only say this seems obvious, but how to prove this logically.