In a book on spectral sequences that I am reading, it is stated, without proof, that $H^i(K(\mathbb{Z},2);H^0(K(\mathbb{Z},1);\mathbb{Z}))$ is isomorphic to $\mathbb{Z}$ for even $i$ and $0$ for odd $i$. This is supposed to arise from the cohomology Serre spectral sequence for the pathspace fibration $K(\mathbb{Z},1) \to P \to K(\mathbb{Z},2)$, wherein $E_2^{i,0} = H^i(K(\mathbb{Z},2);H^0(K(\mathbb{Z},1);\mathbb{Z}))$.
Unless there is something about the space $K(\mathbb{Z},2)$ that I am not aware of, I don't see how the statement holds true. $H^0(K(\mathbb{Z},1);\mathbb{Z})$ is of course isomorphic to $\mathbb{Z}$, but I do know the cohomology groups of $K(\mathbb{Z},2)$. Does anyone know how to calculate the cohomology groups of $K(\mathbb{Z},2)$ (with integer coefficients)? Is that how I am supposed to approach this problem? Thank you in advance.
You can compute this from the described pathspace spectral sequence, using the fact that $P$ is contractible so every nontrivial term in the spectral sequence except the $(0,0)$ term must eventually disappear. Since $H^*(K(\mathbb{Z},1);\mathbb{Z})$ vanishes unless $*=0$ or $*=1$, the only possible nontrivial differentials on the spectral sequence are the $d_2$ differentials, and they must give isomorphisms $H^i(K(\mathbb{Z},2);H^1(K(\mathbb{Z},1);\mathbb{Z}))\to H^{i+2}(K(\mathbb{Z},2);H^0(K(\mathbb{Z},1);\mathbb{Z}))$ for each $i\geq 0$. Since $H^1(K(\mathbb{Z},1);\mathbb{Z})\cong H^0(K(\mathbb{Z},1);\mathbb{Z})\cong\mathbb{Z}$, this just says that $H^i(K(\mathbb{Z},2);\mathbb{Z})\cong H^{i+2}(K(\mathbb{Z},2);\mathbb{Z})$ for each $i\geq 0$. Since $H^0(K(\mathbb{Z},2);\mathbb{Z})\cong\mathbb{Z}$ and $H^1(K(\mathbb{Z},2);\mathbb{Z})=0$ (by Hurewicz), the desired result follows by induction on $i$.