Hint: first use the cup product structure to determine that $f^*$ is trivial. Then use naturality of the short exact sequence
$$0\to \operatorname{Ext}(H_{k+\ell-1}(X),\Bbb Z)\to H^{k+\ell}(X)\to \operatorname{Hom}(H_{k+\ell}(X),\Bbb Z)\to 0$$
to get the result.
As to the second part, there must be a typo because there are no such maps $S^2\to S^1\times S^1$ (since $\pi_2(S^1\times S^1)=0$).
Hint: first use the cup product structure to determine that $f^*$ is trivial. Then use naturality of the short exact sequence $$0\to \operatorname{Ext}(H_{k+\ell-1}(X),\Bbb Z)\to H^{k+\ell}(X)\to \operatorname{Hom}(H_{k+\ell}(X),\Bbb Z)\to 0$$ to get the result.
As to the second part, there must be a typo because there are no such maps $S^2\to S^1\times S^1$ (since $\pi_2(S^1\times S^1)=0$).