A car travels from town A to town B at a constant speed. If it increases its speed by 20%, it can arrive one hour ahead of schedule. If it increases its speed by 25% after travelling the first 120 km at the usual speed, it can arrive 36 minutes ahead of schedule. Find the distance between town A and B.