A very slightly different way: Yes, any (non-vertical) line can be written y= ax+ b. Since I don't like to work with fractions I note that the line passes through the points (1, 2) and (3, 8). When x= 1, y= 2 so 2= a(1)+ b. When x= 3, y= 8 so 8= a(3)+ b.
To solve the two equations 2= a+ b and 8= 3a+ b, subtract the first equation from the second to eliminate b: 6= 2a so a= 3. (That's exactly the same calculation Mr. Bland did to find the slope.) Then 2= 3+ b so b= -1.
y= 3x- 1