The Webster-Ashburton Treaty borders can be handily seen in this map courtesy of wikimedia:
It would have been great for NB and the Maritimes had the British claim to Maine territory gone through rather than what was eventually settled on. Would have made Quebec City and Sherbrooke much closer for Maritime interests for when we would be eventually building railways and highways. In fantasy world that would mean the TCH would have been able to cut west from Perth-Andover, between present-day Caribou and Presque-Isle, and onto Quebec City. This would have opened up the Eastern Townships more to Maritime traffic at the expense of Gaspesie.
This likely would have benefited Fredericton most as it would have made it much closer and direct to Quebec and ROC business and traffic as a whole, but I imagine NB would have benefited as a whole from opening up Northern Maine to Canadian transport. As of now it's essentially deadspace for Maine.