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

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

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