Let $X$ and $A$ two path connected spaces, $A$ subset of $X$. My question is how to commute the group homolgy $H_{0}(X,A)$? Here is what I have tried: For the pair $(X, A)$ we have long sequence $$\cdots\longrightarrow H_{q}(A)\longrightarrow H_{q}(X)\longrightarrow H_{q}(X, A)\longrightarrow H_{q-}(A)\longrightarrow\cdots$$ For q=0, we obtain $$H_{0}(A)\longrightarrow H_{0}(X)\longrightarrow H_{0}(X, A)\longrightarrow 0$$ By the connectedness, $H_{0}(A)=H_{0}(X)=\mathbb{Z}$: $$\mathbb{Z}\longrightarrow \mathbb{Z}\longrightarrow H_{0}(X, A)\longrightarrow 0$$
From Here I dont know what to do. Could you help me please? And what is the result in the general case ( $A$ and $X$ are not path connected)?
At this point, it helps to look at the cycle level. Letting $u \in X \subset X$ be a point, the singular $0$-chain $$ \sigma = 1 \cdot u $$ is a cycle, and in fact a generator of $H_0(A)$. Under the inclusion map, it becomes a generator of $H_0(X)$. Hence the map from $\Bbb Z \to \Bbb Z$ turns out to be an isomorphism; in particular, it's surjective, so that last bit of that long-exact sequence can be replaced by $$ 0 \to H_0(X,A) \to 0 $$ whence we conclude that $H_0(X,A) = 0$.
Why does $\sigma$ generate $H_0(A)$? Suppose that $$ \tau = \sum c_i P_i $$ is an integer linear combination of points of $A$, i.e., a $0$-chain. Because the boundary in dimension $0$ is just the $0$-map, $\tau$ is also a $0$-cycle. For each $P_i$, let $\gamma_i$ be a path from $u$ to $P_i$ (which exists because $A$ is path-connected). Note that on the chain level, we have $\partial \gamma_i = 1 \cdot p_i - 1 \cdot u$. Then $$ Q = \sum c_i \gamma_i $$ has the property that \begin{align} \partial Q &= \sum c_i \cdot (\partial \gamma_i)\\ &= \sum c_i \cdot (P_i - u) \\ &= \sum (c_i \cdot P_i) - (\sum c_i) u) \end{align} so that the chain $\tau$ is homologous to the chain $(\sum c_i) u$.
Thus every chain is homologous to an integer multipl of $\sigma$, so $\sigma$ is a generator of the quotient group.
Exactly the same argument works for $H_0(X)$, except that the paths (and points) must be taken in $X$ rather than just $A$.