In the first example, the textbook says we need the absolute value symbol because x might be negative

$\displaystyle \sqrt{25x^2} = 5\left|x\right|.$

In the second example, the textbook doesn't include the absolute value symbol

$\displaystyle \sqrt{12x^3}=2x\sqrt{3x}.$

What's the difference? When do we use absolute value and when not?