An exact homology sequence associated with a principal SO(n) bundle

Suppose $P$ is a principal $SO(n)$ bundle, X is its base space. Why is there an exact sequence in homology groups $$0 \to H^1(X;\mathbb{Z}_2) \to H^1(P;\mathbb{Z}_2) \to H^1(SO(n);\mathbb{Z}_2)\to H^2(X;\mathbb{Z_2})$$

I am reading a book and this result is stated without a proof. It is said to be deduced from Serre spectral sequence. Could you please help me? Thanks a lot.

• Do you know how to compute the Serre spectral sequence associated to a bundle? If $f\colon X\to B$ is a fiber bundle (more generally a Serre fibration) with fiber $F$, then $E^{p,q}_2=H^p(B,H^q(F))\to H^{p+q}(X)$. – Dan Rust Nov 17 '13 at 15:44

Suppose we have a cohomological first quadrant spectral sequence $E_r^{p,q}$ for $r \ge 2$ converging to $H^*$. Then we have an exact sequence of low degree terms: $$0 \longrightarrow E^{1,0}_2 \longrightarrow H^1 \longrightarrow E^{0,1}_2 \longrightarrow E^{2,0}_2 \longrightarrow H^2$$ Indeed, consider the differential on the $E_2$ page. Since our spectral sequence is concentrated in non-negative degrees, we have the following exact sequence: $$0 \longrightarrow E^{0,1}_3 \longrightarrow E^{0,1}_2 \longrightarrow E^{2,0}_2 \longrightarrow E^{2,0}_3 \longrightarrow 0$$ On the other hand, the filtration of $H^1$ yields a short exact sequence $$0 \longrightarrow E^{1,0}_\infty \longrightarrow H^1 \longrightarrow E^{0,1}_\infty \longrightarrow 0$$ while the filtration of $H^2$ yields a short exact sequence $$0 \longrightarrow E^{2,0}_\infty \longrightarrow F^1 H^2 \longrightarrow E^{1,1}_\infty \longrightarrow 0$$ but $E^{0,1}_\infty = E^{0,1}_3$ and $E^{2,0}_\infty = E^{2,0}_3$, so we can splice these three sequences together to obtain the required exact sequence.
In the case of the Serre spectral sequence for a fibration $F \to E \to B$, we have $$E_2^{p,q} = H^p (B, H^q (F, A))$$ converging to $H^* (E, A)$, so the exact sequence of low degree terms is as below: $$0 \longrightarrow H^1 (B, H^0 (F, A)) \longrightarrow H^1 (E, A) \longrightarrow H^0 (B, H^1 (F, A)) \longrightarrow H^2 (B, H^0 (F, A)) \longrightarrow H^2 (E, A)$$ If $B$ is simply connected and $F$ is path-connected, then this can be simplified to $$0 \longrightarrow H^1 (B, A) \longrightarrow H^1 (E, A) \longrightarrow H^1 (F, A) \longrightarrow H^2 (B, A) \longrightarrow H^2 (E, A)$$ which is what you want.