y =
x + 2
the equation of a line in slope-intercept form is
y = mx + c (m is the slope and c the y-intercept )
to calculate m use the gradient formula
m = ( y₂ - y₁ ) / (x₂ - x₁ )
with (x₁, y₁ ) = (0, 2 ) and (x₂, y₂ ) = (- 4, 0 ) ← points from graph
m =
=
= 
from the graph the y-intercept = (0, 2 ) → c = 2
y =
x + 2 ← is the equation