The equation of a line is given by

Which is the slope-intercept form, where m is the slope and b is the y-intercept
To calculate the slope of the line we need 2 points:

From the graph we can identify them as A and B

We replace the points in the equation of the slope:

Now we replace the value of the slope in the equation of the line:

Using any of the 2 points given by the graph (A or B) we will find the b of the equation:

The equation of the line for the graph would be:
