You could do point-slope, but if you want to do it in slope-intercept:
y = mx + b
Using your example, we can start by finding the slope, which is
. Plug in this slope and one of the points into the slope-intercept equation:
2 =
(4) + b
Multiplying the slope, which has a denominator of 4, by 4 will just cancel out the denominator, giving you -5:
2 = -5 + b
Finish by adding 5 to both sides:
7 = b
Therefore, b = 7.
Hope this helps! :)