On a number line, the length of a segment is the absolute value of the difference of the coordinates. So, if point [tex]X[/tex] has coordinate [tex]a[/tex] and point [tex]Y[/tex] has coordinate [tex]b[/tex], we have
[tex] \overline{XY} = |a-b| [/tex]
So, you have
[tex] \overline{XY} = |-7-(-2)| = |-7+2| = |-5| = 5 [/tex]
[tex] \overline{ZW} = |1-6| = |-5| = 5 [/tex]
So, yes, they are congruent.