Explanation:
the slope is always the ratio
(y coordinate difference / x coordinate difference)
when going from one point on the line to another.
so, we always need to find 2 points to determine the slope.
we can do that as you marked it on your graph, by just going from one integer x to the next integer x (or jumping by 2 or any n), and see how many units y is changing in that interval.
or by checking how long the x-interval is, when y changes 1 unit. this sounds differently, but it is actually doing the exact same thing.
so, in your case
y changes by -1, when x changes by +2.
so, the slope is for A
-1/+2 = -1/2
and we see, B has the same change rates and therefore the same slope (-1/2).
which makes both lines parallel.