To calculate the slope (m), we can use the following formula:

Where (x1,y1) and (x2,y2) are two points of the equation.
We can call y to the payment and x to the hours worked, then, from the given information, we must use the values (3, 34) and (8, 74), by replacing these x and y-values into the above formula, we get:

Then, the slope of this equation equals 8