the form of the linear equation is

m is the slope of the line
b is the y-intercept
Since the slope of the line is 2
m = 2
Substitute it in the form above

To find b substitute x and y in the equation by the coordinates of a point on the line
Since the line contains point (-2, 8), then
x = -2 and y = 8

Add 4 to both sides to find b

Substitute the value of b in the equation

The equation of the line is y = 2x + 12