Complex sentence: Ampicillin acts as a competitive inhibitor of the enzyme transpeptidase, which is needed by bacteria to make their cell walls.
Split into simpler sentences: Ampicillin acts as a competitive inhibitor of the enzyme transpeptidase. Transpeptidase is needed by bacteria to make their cell walls.