[A] + 和 + [B] + ,+ 前者 + [verb phrase] + ,+ 后者 + [verb phrase]
[verb] + 前者 / 后者
前者 and 后者 point back to two things just named: 前者 to the first, 后者 to the second. 者 makes them nouns, so they stand as subject or object. They are written and formal; in speech people repeat the noun or say 第一个 and 第二个.
The most frequent shape names the pair, then gives each its own clause, 前者 first.
As an object, one of them is picked out of the pair.
With three or more items 前者 and 后者 don't work. Name the item, or use 第一个 and 最后一个.