For your graph recall that the gradient (which is your a) is given by the change in y over a change in x.
So since you have a straight line you can get this by looking at some interval (say between 1 and 2) and then look at the difference between in the y values for x = 1 and x = 2. Your a value (which is also called the gradient) will be (y2 - y1)/(x2 - x1) where y2 is the y value for x = x2 and y1 is the y value for x = x1.
Now for the b: b actually represents the y-intercept.
If you have an equation y = mx + b and you let x = 0, you get y = b which is the value when the function crosses the y-axis (which is why this is called the y-intercept).
So if you look at where the graph crosses the y-axis, this is your b value.