Solution (source code)

= Solution

The <de Rham cohomology> of $X$ is
$$
H^r_{\mathrm{dR}}(X)
=\frac{\ker(d:\Omega^r(X)\to\Omega^{r+1}(X))}
{\operatorname{im}(d:\Omega^{r-1}(X)\to\Omega^r(X))}.
$$
Because pullback commutes with $d$, it sends <closed differential form>[closed forms] to closed forms and <exact differential form>[exact forms] to exact forms. Thus a smooth map induces
$$
F^*:H^r_{\mathrm{dR}}(Y)\longrightarrow H^r_{\mathrm{dR}}(X).
$$

Let $H:X\times I\to Y$ be a smooth homotopy and write $H_t(x)=H(x,t)$. If $V=\partial_t$, <Cartan's magic formula> gives
$$
\frac d{dt}H_t^*\omega
=H_t^*(\mathcal L_V\omega)
=d\,H_t^*(\iota_V\omega)+H_t^*(\iota_Vd\omega).
$$
Integrating defines a degree-minus-one operator $K$ satisfying
$$
H_1^*-H_0^*=dK+Kd.
$$
For closed $\omega$, the difference is exact, so smoothly homotopic maps induce the same map on de Rham cohomology.

If $F:X\to Y$ is a <homotopy equivalence> with inverse up to homotopy $G$, functoriality and homotopy invariance give
$$
G^*F^*=\operatorname{id},\qquad F^*G^*=\operatorname{id}.
$$
Hence $F^*$ is an isomorphism.