Marston's has agreed to acquire the beer division of fellow UK brewer Daniel Thwaites for GBP25.1m (US$37m).