ax+b=y
put the both values the left one is x and the right one is y
(1,3)=> a+b=3
(2,1)=> 2a+b=1
subtract both of the equations you will get -a=2
so a=-2 and put a in any of the equation you will get b is 5 so the equation is -2x+5=y
the slope is the x’s number so it’s -2