I've participated in a campaign in which we had alternating GMs on successive sessions, and I've played storytelling games in which multiple players had GM-like authority. I have suggestions!
Learn to say Yes, And...
This is an improv principle that has made its way into storytelling games. You have to be OK with other people having authority over "your" character and story elements you created. You have to have a solid pact with anyone with whom you share authority that it's OK to go to unexpected places.
As an example, let's say you created an NPC, and the other GM gives this NPC a rare, incurable disease. That isn't what you had in mind at all for this NPC's character arc, but you have to say Yes to it.
And then you have to build on it. That's the "And" part of "Yes, And".
In general, because you have to say Yes, it is very difficult to have a long-term over-arching plot with secret plot twists. You know how hard it is to GM when those pesky players start spoiling your carefully orchestrated plot? Now imagine they have GM authority.
For the plot to be coherent at all, you have to enforce the rule that nothing that was previously stated can be contradicted. This rule is often unspoken in single-GM campaigns, but it is necessary to state it explicitly in multi-GM campaigns. This does not mean that NPCs cannot contradict each other. NPCs each have their own perspectives, which may conflict with one another. However, if Bob the Rogue contracted Chartreuse Fever a few scenes ago, he cannot be inexplicably better when we encounter him again. Note the keyword inexplicably. Bob the Rogue can get better, but only if we have established that it is possible to recover from Chartreuse Fever.
Specific Spheres of Authority
As mentioned in my comment, in old school D&D, certain roles of the DM could actually be split into multiple people. There could be a DM, whose authority was specifically over the narrative, and the NPCs. Then there was the Marshal whose authority was specifically over adjudicating the rules.
In modern, story-telling games, such as Archipelago, players not only have authority over their PC, but also over specific, well-defined thematic elements in the narrative. The players discuss which thematic elements are most important to the story they want to tell, for example, the themes of "Weather", "Magic", "Culture", and "Technology". When it comes to a question about Technology, the player whose theme is Technology answers.
Where this can go awry is with games like Pathfinder, where the world-building is already done for you, for the most part. If you are also trying to adhere to a rulebook for setting material, I recommend you not use this technique.
Whatever the case, you do need to have guidelines set down for each of your GMs on what they can say, and when. Do GMs have the right to interrupt each other? If so, how often, and in what circumstance? A very simple division might be one GM with authority over setting and plot elements, and the other with authority to role-play the NPCs. In other words, one GM tells you what happens. The other GM tells you what the NPCs say and do. You saw this happen in the game that led you to this question. This will absolutely work in a dungeon-crawlish game where there is a lot of player versus environment. It would hardly work at all in a social game like Vampire, because so much of what happens is because NPCs are doing things. In either case, it will be much more fun for the GM in charge of role-playing NPCs.
How much are your GM's working together, sharing plot ideas? In the case that they are both working on the same plot, it might be good for them to sit down and write together. This would allow you to circumvent the aforementioned problem of plot-derailment. However, if you think you have problems now with players spoiling your carefully-crafted plot, just imagine how intricate it's going to be with two authors. Remember, the players' actions dictate the story, and in that sense, they're just as much plot authors as the GM(s).
In the alternating GM's campaign I mentioned before, each GM knew nothing of the other GM's ideas for the rest of the campaign. As a result, it was more difficult to build upon story events previously laid out. The end product was a bit haphazard, but nonetheless enjoyable in a slapstick kind of way. If you want a serious game, all the authors should work together.
But you also need enough GM autonomy for there to even be a point to there being more than one GM. Each GM needs a way to hold the "talking stick" so that they're not talking over each other, but can both be involved in the game, adding new elements the other one did not think of. I recommend you absolutely develop a mechanical way for this to happen, and maybe even have a literal talking stick to make it clear who should be speaking and when. The aforementioned Spheres of Authority may be the way to go here.
Before you get too deep...
I recommend your group take a break from your regular campaign and try some GM-less (some would argue GM-full) games like Fiasco. This will get you used to improv principles that can carry over into other games. I recommend Fiasco in particular because it has a specific mechanic where multiple people work together to decide what happens to a single individual. For those of you who have played it already, I'm referring to the "Establish / Resolve" mechanic. This would also let you know if you'd even enjoy this kind of play experience.