The shortest distance between two points is a straight line. That's straightforward for a boat delivery in the right weather.
But not an easy question for all sailboats, especially those that coastal sail generally. If time isn't an issue, there some well placed stops along the way. If you're faced with limited time though, many boats want to minimize the time going from Cape Cod to Maine.
It's a good one for families to get some experience going overnight if they want to. You have to be really careless finding yourself in surprising weather conditions with todays simple accurate weather tools at hand.
We've done it both ways now several times with good results. I tend to be conservative, now, on the distance and the speed we'll average. It's "longer" than the actual distance. The line is seldom that straight even under power going down and conditions are usually a little stronger than we expect. Plus the course and speed we choose is always based on how the boat feels in wind and wave conditions, even under power.
My last trip east I took the boat home alone and stopped at several places along the way I'd passed previously. It was wonderful few days.
Our fastest leg to date was sailing from Cape Cod Canal to Boothbay. About 24 hours. It included whales breeching alongside at daybreak, quite a wonderful sail.