Take $D=A$ in the claim about the existence of a unique arrow $A\to D$. Thus there is a unique arrow $A\to A$. Clearly, $I_A$ is that unique arrow. So, $f\circ g=I_A$.
Take $D=A$ in the claim about the existence of a unique arrow $A\to D$. Thus there is a unique arrow $A\to A$. Clearly, $I_A$ is that unique arrow. So, $f\circ g=I_A$.