Property of multiplication of ideals in $\mathcal{O}_K$ Let $\mathfrak{a}, \mathfrak{b}$ be two coprime ideals of $\mathcal{O}_K = \mathbb{Z}[\sqrt{-d}]$ such that $\mathfrak{a}\mathfrak{b} = (n)$ for some $n \in \mathbb{Z}$. Does $\mathfrak{a}^m = (u)$ imply $\mathfrak{b}^m = (u)$, $u\in \mathbb Z$? I get that the order of $\mathfrak{a}$ and $ \mathfrak{b}$ must be the same since they are inverses in the ideal class group but I'm not sure why $\mathfrak{a}^m = \mathfrak{b}^m$.
I don't think this is true.  Hopefully I haven't misunderstood your question.  Consider $d = -1$.  Let $\mathfrak p = (1+i)$, so $\mathfrak p^2 = (2)$.  Let $\mathfrak a = \mathfrak p$, and $\mathfrak b = \mathfrak p^3$.  Then $\mathfrak a \mathfrak b = \mathfrak p^4 = (4)$ is the ideal generated by an integral, and also $\mathfrak a^2 = (2)$ is the ideal generated by an integral.  But $\mathfrak a^2 \neq \mathfrak b^2$.
I don't think this is true.  Hopefully I haven't misunderstood your question.  Consider $d = -1$.  Let $\mathfrak p = (1+i)$, so $\mathfrak p^2 = (2)$.  Let $\mathfrak a = \mathfrak p$, and $\mathfrak b = \mathfrak p^3$.  Then $\mathfrak a \mathfrak b = \mathfrak p^4 = (4)$ is the ideal generated by an integral, and also $\mathfrak a^2 = (2)$ is the ideal generated by an integral.  But $\mathfrak a^2 \neq \mathfrak b^2$.