since this is a linear equation, use point-slope form of line: y = mx + b
@(0,2), then
2 = m(0) + b, then b = 2.
Next, @ (1,4) and b = 2,
4 = m(1) + 2,
m = 4 - 2, then
m = 2, this your slope which is m.
Now you know your y-intercept, b which is equal to 2 and slope m, which is equal to 2.
y = 2x + 2,
CHECK: @ x = 0, 1, 2, 3, 4, we have
y = 2(0) + 2 = 0 + 2 = 2,
y = 2(1) + 2 = 2 + 2 = 4,
y = 2(2) + 2 = 4 + 2 = 6,
y = 2(3) + 2 = 6 + 2 = 8,
y = 2(4) + 2 = 8 + 2 = 10.
We now confirmed the correctness of our generated equation y = 2x + 2.