Changing cars mid year

how should I record vehicle business expenses for the year if I owned a vehicle for self employed work that had lots of maintenance work done on it before selling it and then buying another vehicle for my work that I also put lots of maintenance into it?