Relative homology group of cone of space with five path components

I am working on Exercise 5.21 from Rotman's algebraic topology book:

Assume that $$X$$ has five path components. If $$CX$$ is the cone on $$X$$, what is $$H_1(CX,X)$$?

Here is my solution:

We know that there is a long exact sequence $$\dots\to \tilde H_1(CX)\to H_1(CX,X)\to\tilde H_0(X)\to\tilde H_0(CX).$$ Since $$CX$$ is contractible, we know that $$\tilde H_1(CX)=H_1(CX)=0$$. This means that the image of the map $$\tilde H_1(CX)\to H_1(CX,X)$$ is $$0$$, and so the map $$H_1(CX,X)\to\tilde H_0(X)$$ has $$\ker=0$$.

We also know that $$\tilde H_0(X)$$ is the free abelian group with rank equal to one less than the number of path components of $$X$$. Thus $$\tilde H_0(X)=\mathbb Z^4$$ and $$\tilde H_0(CX)=0$$. Hence the map $$H_1(CX,X)\to H_0(X)$$ has image isomorphic to $$\mathbb Z^4$$ (since the map $$\tilde H_0(X)\to\tilde H_0(CX)$$ is everywhere $$0$$), from which we conclude that $$H_1(CX,X)\cong\mathbb Z^4$$.

I don't see any mistakes, but this is one of my first relative homology group computations, so I'd just like to check if the solution is actually correct.

EDIT: I just edited my solution (I messed up a bit by working with regular homology, instead of reduced homology groups; I think the solution is basically the same either way, but I think this one is better).

Yes, your proof is correct. If you have an exact sequence $$0 \to A \to B \to 0,$$ then $$A \to B$$ is an isomorphism. Take $$A = H_1(CX,X)$$ and $$B = \tilde H_0(X)$$.