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.
$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.