To determine the slope and the equation of the line you need two points.
Represent these points as (x1,y1) and (x2,y2). Where the x and y values are numbers.
Slope m = (y2-y1)/(x2-x1) or (y1-y2)/(x1-x2) (both give the same result m).
The equation of the line is:
y-y1=m(x-x1) or y-y2=m(x-x2) (both give the same equation).
So y=m(x-x1)+y1=mx+y1-mx1. The y-intercept=y1-mx1, which is a number since m, x1 and y1 are all numbers. The y-intercept can also be obtained from y2-mx2.