Solution
If we analyze the first case we have this:
Lets select the points (-1,5) and (0,8)
The slope is given by:

And we can find the intercept in the following way:
5= 3(-1) +b
b= 5+3=8
Then the equation would be:
y= 3x +8
For the second case we can select (13,7) and (14,8) and we got:

And the intercept would be:
7 = 1*13 +b
b= 7-13= -6
Then the equation would be:
y= x -6