Answer:
a=2, b=-1
Step-by-step explanation:
Line A goes 1 along and 2 up we can use rise/run to get 2/1 so the gradient of line A is 2.
Line B goes -2 across and -2 up. So -2/-2 so the gradient of line B is -1.