the graph equation is in the form y = mx + c
we need to find m - gradient and c - intercept of the graph
since we have been given 2 points we know the x and y coordinates of these 2 points
point A , x = 0 and y = -4
point B , x = 6 and y = 2
substituting these x and y values in y = mx + c form
-4 = m*0 + c
-4 = c
then intercept is -4
substituting x and y in point B
2 = m * 6 + c
since c = -4
2 = 6m - 4
6m = 6
m = 1
since we know m=1 and c = -4
the equation for line AB is
y = 1*x - 4
y = x - 4