The Earth Kingdom is a City-State nation. That's how two different cities can have different rulers. Such as King Bumi and King Kuei. Or earlier (before Aang's time), when Kyoshi was the Avatar, there was Chin the Conqueror and King Kuei's ancestor.
As for King Kuei's predicament, it wasn't his fault that Long Feng was in charge and he was a figure head for most of his life. If I remember correctly and I will find a source for it, Kuei was four years old when he was crowned king. Long Feng was the regent for Kuei until he was of age.
But being a four year old and had to grow up a ruler, Long Feng had many years to basically usurp the throne from Kuei. But Kuei has no power over Omashu. And Bumi has no power over Ba Sing Se.