If $0 \rightarrow A \rightarrow B \rightarrow C \rightarrow 0$ is an exact sequence, show that
$p d(B) \leq \max \{p d(A), p d(C)\}$ with equality except when $p d(C)= p d(A)+1$.
$id (B) \leq \max \{i d(A), i d(C)\}$ with equality except when $i d(A)= i d(C)+1$.
$f d(B) \leq \max \{f d(A), f d(C)\}$ with equality except when $f d(C)= f d(A)+1$.
Here $A$ is a right $R$-module, $pd(A)$ is the projective dimension of $A$, $id(A)$ is the injective dimension of $A$, $fd(A)$ is the flat dimension of $A$.
Suppose that $0\to P'_{3}\to P'_{2}\to P'_{1}\to P'_{0}\to A$ is a projective resolution of $A$, and $0\to 0\to 0\to P''_{1} \to P''_{0}\to C$ is a projective resolution of $C$, then by Horseshoe lemma, there is a projective resolution of $B$: $$ 0\to P'_{3}\to P'_{2}\to P'_{1}\oplus P''_{1}\to P'_{0}\oplus P''_{0}\to B, $$ so $p d(B) = 4 = \max \{p d(A), p d(C)\}$.
How to prove that $p d(B) \leq \max \{p d(A), p d(C)\}$ with equality except when $p d(C)= p d(A)+1$? And could you please tell me how to prove 3? Thanks!