Here is the question I am trying to understand its solution:
Show that if $X$ and $Y$ are finite $CW$ complexes such that $H^*(X;\mathbb Z)$ and $H^*(Y;\mathbb Z)$ contain no elements of order a power of a given prime $p,$ then the same is true for $X \times Y.$
Here is a part of a solution I found online:
[![enter image description here][1]][1]
Why in the last line he is substituting for the homology groups by the same values of the cohomology groups, could someone clarify this to me please?
Exit:
I also did not get the idea of the second paragraph in the solution here Questions about Hatcher 3.2.16 I think they are speaking on the same thing, Could someone clarify this to me please? [1]: https://i.stack.imgur.com/pi9QX.png
This "solution" is simply inaccurate. Take $X$ to be the CW-complex obtained by attaching a $2$-cell to $S^1$ along a degree $n$ map $S^1\rightarrow S^1$. Then, $H^{\ast}(X)=\mathbb{Z}[a]/(na,a^2)$ with $|a|=2$. For $n\neq0$, this cohomology clearly contains torsion, hence is neither torsion-free nor free. Yet, choosing $n$ coprime to $p$ guarantees the cohomology contains no elements of order a $p$-power. Thus, the claim at the bottom of p.68 in your screenshot is irredeemably wrong. I suggest following Hatcher's hint or finding some other way of applying the Künneth theorem (which the chapter was about) to solve this problem.