First, we draw the segments:
Now, to compute the slopes of the segments we use the following formula:
The slope of the red segments is:
The slope of the blue segments is:
Notice that the absolute value of the slopes is the same but the values are the negative of each other, so the segments are equally steep but in opposite directions.