Let's use numbers to start.
If a car is driven 50 km/day during the week, that's 5(50) = 250 km/week. With z km/day, that's 5z km/week.
If the car does 25 km/litre, that's 250/25 = 10 litres/week. Since the car does g km/litre, that's 5z/g litres per week.
Now, if petrol is $2 per litre, you're paying 2(10) = $20/week in petrol. Since petrol is $v, you are paying 5zv/g. We put the variables in alphabetical order in either the numerator or denominator, so for the week, you spent 5vz/g in petrol.