y=mx+b where m is the slope and b is the y intercept.
The y intercept is where the line crosses the y axis which in this example is at (0, 2). The y intercept is 2. The slope can be found by plugging in the x and y values of any 2 points on the line into the equation: y2 - y1 / x2- x1: