This is the equation for the slope of a line as well as y= mx+ b.
You just need to substitute it to the given number. Example: (-2,2) (2,4)
(x1, y1) is the first point (-2,2). So this means that x1 = -2 and y1 = 2
Also, (x2,y2) is the second point (2,4). So this means that x2 = 2 and y2 = 4.
And then, just substitute the points the formula and then solve it! Try my given example first and then tell me your answer :) If you want to practice this, the answer would be m = 1/2!
Hope i helped! :)