# How to properly write rational exponents when expressed as roots?

I'm aware that we can express $x^{2/3}$ as $(x^2)^{1/3} = (x^{1/3})^2$. Expressing these exponents in terms of roots is something that confuses me. Should the above expression be written as:
$$(\sqrt[3]{x})^2 \quad \text{or} \quad \sqrt[3]{x^2}$$ and what difference does it make if we write it in one way or the other?

Note: I'd also appreciate it if you could answer this question more generally and also refer to the domains of functions you mention (e.g. $\sqrt{x}$, so $x \geq 0$) in your answer.