I am note sure about an exercise which asks to find a right inverse function of $w=z^3$
May I simply answer that is $z=\sqrt[3]{|w|}(\cos\frac{\theta+2k\pi}{3}+i\sin\frac{\theta+2k\pi}{3})$?
In the same question, I have to find a right inverse function g for $w=z^4$ such that $g(-1)=\frac{\sqrt(2)(1+i)}{2}$... I know that If I choose $k=0$ and $\theta =\pi$ in the n-th root formula, I reach that condition. So, should the answer be $g(w)=\sqrt[4]{|w|}(\cos\frac{\pi}{4}+i\sin\frac{\pi}{4})$?
Your answers are on the right track. For the $z^3$ problem you need to specify that $\theta = \operatorname{Arg}(w)$, and state what $k$ is (an arbitrary integer in your case). For $z^4$ you can't just take $\theta = \pi$ because $\theta = \operatorname{Arg}(w)$ varies with $w$. (The $g(w)$ you wrote has $g(w)^4 = -|w|$ which is not what you want). You can use a similar approach to what you did on $z^3$ be defining $$ g(w) = \sqrt[4]{|w|} \left(\cos\left(\frac{\operatorname{Arg}(w) + 2 k \pi}{4}\right) + \sin\left(\frac{\operatorname{Arg}(w) + 2 k \pi}{4}\right)\right) $$ Then you need to determine what value of $k$ will have $g(-1) = \frac{\sqrt2}2(1 + i)$