Q:

Equation for Comparing Autos

I am buying a used vehicle. I want an equation that will allow me to compare two vehicle's value that are identical in every way except price and mileage. For example:
Car A: $20395 cost and 83400 miles
Car B: $17090 cost and 10500 miles
Car C: $24000 cost and 39000 miles
Miles: lower miles = good 
Cost: higher cost = bad 
What is a ratio/equation that can produce a number to compare these two variables across vehicles? 

A:

Decide on a number of miles that represents a wore-out car and call that number as w.
Then
(miles / w) * price = index value .
But large differences in price become relatively insignificant at small mileages.
New edit:
Or instead
index value = (w - miles) / price  .
That's actually miles-remaining-per-dollar. But that doesn't hold for negative values.

