Solution (source code)

= Solution

A <simply connected space> is path-connected and has trivial <fundamental group>, equivalently every based loop is null-homotopic. The <Whitehead theorem> says that a map of <CW complexes> inducing isomorphisms on all homotopy groups is a <homotopy equivalence>. Its <homological Whitehead theorem> form says that a map between simply connected CW complexes, in particular finite ones, is a homotopy equivalence if it induces isomorphisms on integral homology. The latter implication follows from the relative <Hurewicz theorem> and the ordinary Whitehead theorem; homotopy equivalences necessarily induce homology isomorphisms.

For the attached-cell space $X$, the <cellular homology> chain complex in positive degrees is
$$
0\longrightarrow\mathbb Z^2\xrightarrow{(2\ \ 3)}\mathbb Z\xrightarrow0\mathbb Z\longrightarrow0.
$$
Dualizing gives the <cellular cohomology> complex $\mathbb Z\xrightarrow0\mathbb Z\xrightarrow{t\mapsto(2t,3t)}\mathbb Z^2$. The last map is injective and its image is primitive because $\gcd(2,3)=1$. Its cokernel is $\mathbb Z$, explicitly via $(a,b)\mapsto3a-2b$. Hence
$$
\boxed{H^q(X;\mathbb Z)=\begin{cases}\mathbb Z,&q=0,2,\\0,&q\neq0,2.\end{cases}}
$$
The <van Kampen theorem> gives $\pi_1(X)=\langle a\mid a^2=1,\ a^3=1\rangle=1$. Moreover $H_2(X)=\ker(2\ \ 3)$ is generated by $(3,-2)$. Since $X$ is simply connected, the <Hurewicz theorem> gives $\pi_2(X)\cong H_2(X)$. Choose a map $S^2\to X$ representing that generator. It induces an isomorphism on $H_2$, and on $H_0$, while all other reduced homology groups vanish on both sides. The <homological Whitehead theorem> proves $\boxed{X\simeq S^2}$. This is a special case of <coprime two-cell attachments to a circle>.

It is \b[not homeomorphic to the sphere]. Indeed, if it were, its embedded one-skeleton would be a Jordan circle in $S^2$, with the two open cell interiors as its complementary regions. The <Jordan curve theorem> and its Schoenflies form identify the closures of those regions with discs. A characteristic map, homeomorphic on the interior of such a disc, has local degree $+1$ or $-1$ at an interior point; the boundary homomorphism in relative homology then makes its attaching map on the circle have degree $+1$ or $-1$. This contradicts degrees $2$ and $3$. This argument does not require choosing special covering representatives of the attaching maps.

Finally, two compact examples with the same additive cohomology are
$$
\boxed{T^2\quad\text{and}\quad S^1\vee S^1\vee S^2.}
$$
Both have $H^0=\mathbb Z$, $H^1=\mathbb Z^2$, $H^2=\mathbb Z$ and zero higher cohomology, by their cellular chain complexes. But their fundamental groups are respectively $\mathbb Z^2$ and the nonabelian <free group> on two generators, so they cannot be homotopy equivalent. This illustrates that <cohomology groups do not determine homotopy type>.