I feel that this is a rather silly question, stemming from a fundamental misunderstanding of quotients, but I'm not quite able to make it precise. My question is: given two ideals $\mathfrak{a,b}\subseteq R$ where $R$ is some commutative ring, can we in general give meaning to a quotient $(R/\mathfrak a)/\mathfrak b$?
For example, consider $R=k[x,y]$. The ring $(R/(x))/(y)\cong k[y]/(y)\cong k$ obviously makes sense.
Another example may be $R=\mathbb Z$ with ideals $(2),(4)$. Then, if we were to give some meaning to these quotients, then we might write $(\mathbb Z/(2))/(4)\cong\mathbb Z/(2)$, since in a sense when we take the second quotient we have already "cut out the relevant information about $\mathbb Z$" by quotienting by $(2)$.
My first question: does any of this make sense at all? In particular, can $(4)$ even be considered an ideal of $\mathbb Z/(2)$?
My second question: if the answer to the above is positive, and I have ideals $\mathfrak b\subseteq\mathfrak a\subseteq R$, then can I prove that $(R/\mathfrak a)/\mathfrak b\cong R/\mathfrak b$ generalizing the second example? If these ideas make sense, I would equivalently need to construct $\phi:R/\mathfrak a\to R/\mathfrak b$ with kernel $\mathfrak b$.
Finally, my motivation comes from exercise 1.8 in Hartshorne: in the solution, we have some affine variety $Y$ of dimension $r$ and an ideal $\mathfrak p$ corresponding to the intersection of $Y$ with a nontrivial hypersurface - we end up proving $\dim A(Y)/\mathfrak p = r-1$ and want to conclude that the variety associated to $\mathfrak p$ has dimension $r-1$. Thus, we'd need to show $\dim (A/I(Y))/\mathfrak p=\dim A(Y)/\mathfrak p$ which would follow from the second question, however all solutions that I have seen regard this as a somehow trivial step.
Let $R$ be a commutative ring and consider three $R$-modules $A \subseteq B \subseteq C$. Then $B/A \subseteq C/A$ and we have the following
In particular, an ideal is an $R$-module contained in $R$, so this applies to any chain of ideals $I \subseteq J \subseteq R$, too.
It is worth noting that we also have the following
Again, this holds in particular for any two ideals $I,J$ of $R$.