The equation of a line in slope intercept form is:

where m is the slope and b is the y intercept.
In this case we notice that the y-intercept is 2, this means that b=2.
To find the slope we need to use the formula:

using the points (0,2) and (8,0). We have that the slope is:

Now we plug the values for the slope and the intercept in the equation, therefore the equation we are looking for is:
