John wants to rent a car. He knows that a friend used XYZ rental agency in the past. His friend paid $65 to drive 50 miles and $74 to drive 80 miles. What is the linear function the agency uses to find the cost?

To determine the linear function used by the XYZ rental agency to calculate the cost of renting a car, we can use the given information. Let's denote the distance in miles as 'm' and the cost as 'c'.

From the given information, we have two data points:
1. Distance = 50 miles, Cost = $65.
2. Distance = 80 miles, Cost = $74.

To find the linear function, we need to determine the slope and y-intercept.

Step 1: Finding the slope:
The slope (m) can be calculated using the formula:
m = (change in y)/(change in x)

Using the given data points:
change in x = (80 - 50) = 30 miles
change in y = ($74 - $65) = $9

Therefore, the slope (m) = 9/30 = 3/10 or 0.3.

Step 2: Finding the y-intercept:
The y-intercept (b) represents the cost when the distance is zero (c = 0).

We can use either data point to find the y-intercept. Let's use the first data point:
Distance = 50 miles, Cost = $65.

Using the equation of a line (y = mx + b), we substitute the values:
$65 = 0.3 * 50 + b
$65 = 15 + b

Solving for b, we find:
b = $65 - $15 = $50.

Step 3: Writing the linear function:
Now that we have the slope (m = 0.3) and the y-intercept (b = $50), we can write the linear function in the form of y = mx + b.

Therefore, the linear function for the XYZ rental agency to calculate the cost of renting a car is:
c = 0.3m + $50.

In this equation, 'c' represents the cost of renting a car, and 'm' represents the distance traveled in miles.