Note that there is in general no morphism $g: I \to J$ such that the following diagram commutes:
$$\begin{array}{ccc}
I & \xrightarrow{g} & J \newline
i\uparrow & & \uparrow j \newline
A & \xrightarrow[f]{} & B
\end{array}\tag{$\ast$}$$
For, the commutativity of the diagram forces $\ker(i) \subseteq \ker(j\circ f)$, but the three maps $i,j,f$ are completely independent from each other. However $g$ can be choosen such that the diagram commutes up to homotopy. Moreover, $g$ is unique up to homotopy. The proof uses the
Comparison Theorem: If $I$ is a bounded below complex of injectives and $\alpha: X \to Y$ is a weak equivalence of two arbitrary complexes, then
$$[Y,I] \to [X,I],\; [h] \mapsto [h \circ \alpha]$$
is an isomorphism of homotopy classes.
A reference for (the projective version of) the comparison theorem is Brown: Cohomology of Groups, Theorem I.8.5.
We are now ready to construct $g$ above: $i: A \to I$ is a weak equivalence and $J$ is injective, bounded below. Hence $[I,J] \to [A,J],\; [h] \mapsto [h \circ i]$ is an isomorphism. Because of $[j \circ f] \in [A,J]$ there is consequently $g: I \to J$ with $[g \circ i]=[j \circ f]$, i.e. $g\circ i \simeq j \circ f$. The uniqueness of $g$ is shown in the same way using the injectivity of the comparison map.