To determine the waiter's earnings, y, based on the number of hours worked, x, you have to determine the y-intercept and slope of the line.
The y-intercept is the point where the line crosses the y-axis, in this example it indicates the waiter's earning when he worked x=0 hours. The y-intercept is (0,35)
To determine the slope of the line you need to use the following formula
Where
m is the slope
(x₁,y₁) are the coordinates of one point of the line
(x₂,y₂) are the coordinates of a second point of the line
Using the points (4,45) and (2,40) you can determine the slope of the line as follows:
The slope of the line is m=2.5, this means that the waiter's earnings increase by 2.5 for each hour worked.
Using the slope-intercept form you can determine the equation as follows:
Where
m is the slope
b is the y-coordinate of the y-intercept
For m=2.5 and b=35, the equation that corresponds to the total earnings of the waiter based on the hours worked is