well the underlying variable that relates x and f(x) is time.

let $t$ be the years owned

$val(t)=20000(1-0.2)^t=20000(0.8)^t$

$mileage(t)=15000 t$

let $x=mileage(t)$

$x=15000 t$

$t = \dfrac{x}{15000}$

so

$f(x) = val(t(x))=20000(0.8)^{x/15000}$