The simplest way to solve a general inequality is to first solve the corresponding equation. If |x+ 3|= 2 then either x+ 3= 2 or x+ 3= -2. In the first case x= -1 and in the second x= -5.

The key point here is that, since absolute value is continuous, we can go from "<" to ">", and vice-versa, only at "=". That is, the two points, -5 and -1, divide the real numbers into three intervals and on each interval only one of "<" or ">" can apply. And we need only check one point in each interval to see which.

For example, -6< -5 and |-6+3|= |-3|= 3 which is larger than 2, not less. The original inequality is false at x= -6 and so false for all x less than -5. -4 lies between -5 and -1 and |-4+3|= |-1|= 1 which is less than 2. The original inequality is true at x= -4 and so true for all x between -5 and -1. Finally, 0 is larger than -1 and |0+ 3|= |3|= 3 which is larger than 2, not less. The original inequality is false at x= 0 and so false for all x larger than -1.

By the way, every keyboard I have ever seen has a "|" just above the return key. Are you using a keyboard that doesn't?

Is the if condition there because we define it like that at the beginning ?

I think the answer is "yes"
The result x>-1 came from the condition that x>-3. x>-3 and x>-1 are not two solutions. Those x values for which -3<x<-1 do not satisfy the original inequality. In similar way, when we supposed that x<-3 we got the result x<-5. Again, the original inequality is not true for -5<x<-3.