Could someone explain how to do this ?

Step-by-step explanation:
First you determine the slope
Slope=M= (y2-y1)/(x2-x1)
Then when you have the slope, you plug in one of the coordinates and see how much b is.
Your answer is something in this form.
Y=MX+B
M and B are what you change.