Imagine a point anywhere, except on the line x = -2. Then that point's shortest path to the line x = -2 is a horizontal line whose length is the absolute value of the difference between this point's x-coordinate and -2.

Here you have the point (3, 5), whose x-coordinate is 3. The corresponding shortest distance to the line x = -2 is then .

I know a picture is worth a thousand words but I don't know how to make pictures of graphs.

EDIT: Note this distance would be the same regardless of the value of y.