Why would a person take gas x for a strained rib muscle?

Decreased pain. Gas build-up in the bowels can make the belly bigger. The ribs line the upper part of the abdomen and can get pushed apart when the "belly blows up". Rib muscles hold the ribs together, so if the ribs are being stretched apart, a strained muscle is likely to hurt. It isn't dangerous to have gas, it can just be more uncomfortable.