Since we know that the perimeters are equal, we can make an equation where the sum of the side lengths of one triangle equal the sum of the side lengths of the other triangle. This yields (x-2)+(x)+(3x+1)=(2x-5)+(x+4)+(6x-7). If we combine like turns, the equation becomes 5x-1=9x-8. We can use the subtraction property of equality to isolate the x and the integers by saying 9x-5x=-1-(-8). Simplifying this gives 4x=7 or x=1.75
Think of it as a number line, like in the picture below. The absolute value is how far a number is from zero (0). If 5 is 5 away from zero, then the opposite of 5 (-5) is also 5 away from zero.