y=mx+b is the equation of a linear function, which is what this question is asking.
since you have 2 points, you can use this equation for solve for "m", the slope
y2-y1/x2-x1
this would be 10-5/8-2 in this case, which is 5/4
you now have 5/4 as your slope
you can then take one of your points, and substitute in for the original y=mx+b equation
8 = 5/4 * 5 + b
8 = 25/4 + b multiply the fractions together (multiply across)
32 = 25 + b (multiply both sides by 4 to eliminate the fraction
7 = b ( subtract 25 from both sides )