Step 5: Combine the structures to form the ester. Remove the hydroxyl group from the carboxylic acid and the hydrogen from the alcohol's hydroxyl group, then connect the oxygen of the alcohol to the carbonyl carbon of the acid to form the ester linkage (R-COO-R').