Difference between Arithmatic and Algebra root and absolute vlaue

I am a bit confused about something. In arithmetic, roots and absolute values do not result in both positive and negative values; they typically give only positive results. However, in algebra, roots and absolute values often result in both positive and negative values. In this case, how can we differentiate between the two situations, and which method should we use to answer the question?

Thank you for your assistance.
Regards,

If x^2 = 9, then you can apply the square root to both sides to get \sqrt{x^2} = \sqrt{9} ​.

Since \sqrt{9}=3 and \sqrt{x^2}=|x|, you’re left |x| = 3, which ideally you should know how to solve.