The pair $(S^{-1}A,\lambda_{A,S})$, where $\lambda_{A,S}\colon A\to S^{-1}A$ is defined by $a\mapsto a/1$ is universal with respect to the property that, for every ring homomorphism $g\colon A\to C$ such that $g(s)$ is invertible, there exists a unique ring homomorphism $\hat{g}\colon S^{-1}A\to C$ with $\hat{g}\circ\lambda_{A,S}=g$ and $\hat{g}(a/s)=g(a)g(s)^{-1}$.
Let us show that the pair $(S^{-1}A/S^{-1}I,\mu)$ has the universal property pertaining to $(T^{-1}(A/I),\lambda_{A/I,T})$, where $T=\pi(S)$ (being $\pi\colon A\to A/I$ the canonical map) and $\mu\colon A/I\to S^{-1}A/S^{-1}I$ is defined by
$$
\mu(a+I)=\frac{a}{1}+S^{-1}I
$$
Note that $\mu$ is well defined, because if $a\in I$, then $a/1\in S^{-1}I$ by definition. It's obviously a ring homomorphism.
Now, suppose $g\colon A/I\to C$ is a ring homomorphism such that $g(s+I)$ is invertible for every $s\in S$. Set $h=g\circ\pi$. Then, by the universal property of $S^{-1}A$, there is a unique ring homomorphism $\hat{h}\colon S^{-1}A\to C$ such that
$$
\hat{h}\circ\lambda_{A,S}=h
$$
Suppose $a\in I$ and $s\in S$; then
$$
\hat{h}\left(\frac{a}{s}\right)=h(a)h(s)^{-1}=h(s)^{-1}g(\pi(a))=0
$$
so that $\hat{h}$ factors through $S^{-1}I$ and it defines a ring homomorphism $\hat{g}\colon S^{-1}A/S^{-1}I\to C$, as requested. The uniqueness of $\hat{g}$ is obvious.