One of the largest clean energy companies in Massachusetts is finalizing a landmark acquisition with a Rhode Island expansion.