Setup 2 arrays, car number/name and penalty. Do a bubble sort on penalty and for each swap not swap step do the same to the car number/name array.