In theory, it should take you a little over 4.5 hours to get between Cairns and Townsville. But between the combination of road works and things to see and do along the way, I'd suggest that you give yourself at least a full day.