Not sure if this is right as it's been a while since I've done this, but:
Equation for a line can be represented as:
y=mx+c
We have two points so we can substitute those both into the equation above:
So this corresponds to c = 2 and m = -1, or an equation of y = -x+2, which both the points they gave us lie on.