I recommend to book hotel in Cairns then hire a car, take a bus or taxi for a day trips to Port Douglas or Palm Cove. You can also consider to stay in each town few nights.