Cars.com posted higher revenue and swung to a net profit in the third quarter compared with the same period in 2020.