WHAT FXO AND FXS IS
An FXO gateway converts the regular, public switched telephone network (PSTN) into one of VoIP variants. An FXS gateway does exactly the opposite - it takes VoIP signal and transforms it back to regular “phone line” signal.
IN OTHER WORDS
Using a FXO/FXS pair, the hypothetical New York/Maine company above can bridge the two offices together and literally put everyone on the same phone network, regardless of location.
The advantages of using FXO/FXS pairs are clear - they allow to “bridge” remote offices in a fairly seamless way with advanced functionality and to cut costs of such integration. The main disadvantage is that you still need a phone service (although you have the luxury of choosing the location where you get it). The second disadvantage is that high-end FXS/FXO gateways capable of handling dozens of lines cost significantly more than consumer-grade products.