" I really don’t understand that concept of when x<0 then it the squareroot will be negative."

-x is not always a negative number

If say x=3, then -x = -3 but if x = -3 then -x =+3

If x is negative then -x is positive.

No-one has said that " when x<0 then it the squareroot will be negative"

In fact when talking about real numbers, the squareroot of something is always positive (or zero).

So, \(\displaystyle \sqrt {x^2} = | x |\) and \(\displaystyle | x | = x \) if x>0 but \(\displaystyle | x | = -x\) if x<0.

It's like \(\displaystyle \sqrt {(-3)^2} = - -3 = 3\).

As Dr P said in Post #5 :

View attachment 12903