An expression $log_2 x^2=2$ can be written as $2log_2 x=2$ but leads to loss of a root. I am having difficulty is recognizing the expressions in which above property is applicable. Another expression $log_2^3 x=log_2 x^3$ can be written as $log_2^3 x=3log_2 x$ and doesn't leads to any loss. My teacher has finished logarithm and it is very difficult to ask him as he rarely replies to queries(also the teaching is online).
I thought that it would be related to the power of $x$ if it is either odd or even i.e. we apply property if the power is odd but not when it is even. And also if the base is a constant or variable i.e. property applicable to logs with variable bases and not in constant bases.
I want to know how to recognize in questions that this property doesn't lead to any loss. Kindly help.
You seem to be assuming the logarithm power law holds for any real numbers. This isn't generally true. What we can say is that $$\log_a{(x^n)}=n\log_a{(x)}$$ holds for all $a,x\gt0$ (with $a\ne1$) and $n\in\mathbb{R}$. But you can also instead use $|x|\ge0$ to somewhat extend this identity to the entire non-zero reals. Namely $$\log_a{(|x|^n)}=n\log_a{(|x|)}$$ holds for all $x\in\mathbb{R}\setminus\{0\}$. For even $n\in\mathbb{Z}$ this becomes $$\log_a{(x^n)}=n\log_a{(|x|)}$$