Showing that $I=(3,1+\sqrt{-5})$ is $\mathbb{Z}[\sqrt{-5}]$-flat. 
For this homework exercise, we are asked to show that the ideal $I=(3,1+\sqrt{-5})$ is a flat $\mathbb{Z}[\sqrt{-5}]$-module. The hint is to show that $I$ becomes principal (and thus free as a module) when we invert $2$ or $3$, so that $I$ is locally flat.

I'm having trouble understanding what happens to $I$ when we invert $2$ or $3$. I would say that if we invert $3$, then $3$ becomes a unit. How does this make $I$ principal? If we invert $2$, I don't see how this gets us anywhere.
Furthermore, I don't understand why it helps to prove that $I$ is locally flat. There is a lemma in our course notes saying that if $M$ is a finitely generated $R$-module in a local ring $R$, then $M$ is flat iff $M$ is free. So if $I$ is locally flat, why is it flat as well?
I hope my confusion is coming across. Any help relating to these questions is appreciated, and if anything is unclear, please tell me.
 A: $I\mathbb Z[\sqrt{-5}]_3=\mathbb Z[\sqrt{-5}]_3$, and $I\mathbb Z[\sqrt{-5}]_2=(1+\sqrt{-5})\mathbb Z[\sqrt{-5}]_2\simeq\mathbb Z[\sqrt{-5}]_2$, so in both cases we get a free module. Now use that $2$ and $3$ are coprime in $\mathbb Z[\sqrt{-5}]$.
Remark. In fact, $\mathbb Z[\sqrt{-5}]$ is a Dedekind domain, so all its ideals are invertible, that is, projective.
A: So, a couple days later, a little wiser. Here it goes.
Indeed, as Gerry suggested, inverting $(2)$ makes $I$ equal to $(\tfrac{1}{2}(1+\sqrt{-5}))$ and inverting $(3)$ makes $I$ equal to the whole ring since $I$ contains a unit, so in both cases $I$ is principal and thus free as a module.
Theorem: Let $R$ be a ring and $M$ a finitely generated $R$-module. Then $M$ is flat if and only if for every prime ideal $\mathfrak{p}\subset R$, the localization $M_{\mathfrak{p}}$ is free as an $R_{\mathfrak{p}}$-module.
Note that either $(2)$ or $(3)$ is not contained in every prime ideal of $\mathbb{Z}[\sqrt{-5}]$, so for every prime ideal $\mathfrak{p}$ we have inverted either $2$ or $3$ in $R_{\mathfrak{p}}$. This implies that $M_{\mathfrak{p}}$ is free as an $R_{\mathfrak{p}}$-module for every prime ideal of $R$, so by the theorem, $M$ is flat.
