First, find the slope for the line. Choose any 2 points and note their coordinates. I'll take (0,4) and (2,10) as an example. Then you apply your formula, remembering each coordinate comes in the form of [tex](x,y)[/tex].
[tex]\frac{y2-y1}{x2-x1} = \frac{(10)-(4)}{(2)-(0)} = \frac{6}{2} = 3\\[/tex]
The slope ([tex]m[/tex]) is 3.
In this case, the slope represents the price per kilometer.
So, the fare is $3 per kilometer + the base fare, which is the value already present at 0km. According to the graph, when [tex]x=0[/tex], [tex]y=4[/tex].
Let's assume the following:
[tex]p =[/tex] Price per Kilometer, [tex]b =[/tex] Base Fare, [tex]k =[/tex] Amount of Kilometers, [tex]t =[/tex] Total Cost
The total fare would be calculated by the following formula:
[tex](p*k)+b[/tex]
Using the given values:
[tex]p=3,b=4,k=6\\\\t=(3*6)+4\\t=18+4\\t=22[/tex]
In conclusion, the total cost for 6km is $22. Option A.