Application of Correspondence theorem for rings

Can someone help me with the following problem? I am just now getting familiar with the concepts of the Correspondence Theorem for rings, the Substitution Principle, and principal ideals. But don't know how to put them all together.

Problem: Let $R$ be a ring and $x,y \in R.$ Set $\overline{R}=R/(x)$ and let $\overline{y}$ denote the coset of $y$ in $\overline{R}.$ Let $(\overline{y})$ be the principal ideal of $\overline{R}$ generated by $\overline{y}.$ According to the Correspondence Theorem, an ideal of $\overline{R}$ has the form $\frac{J}{(x)}$, with $(x) \subseteq J$, where the notation $\frac{J}{(x)}$ stands for $\frac{J}{(x)}=\{\overline{a}|a \in J\}.$ How can I show that $$(\overline{g})=\frac{(f,\ g)}{(f)}$$ and $$\frac{R}{(f,g)} \cong \frac{\overline{R}}{(\overline{g})}?$$

Because of the correspondence theorem, the first equation comes down to the fact that $(f,g)$ is the pre-image of $(\bar g)$ with respect to the map $R \to R/(f)$.
The second isomorphism is obtained by using one of the isomorphism theorems applied on $(f) \subset (f,g) \subset R$ and the first equation.