When one has a door between two rooms there is a list of criteria to determine which side is considered the right side of the door. You should evaluate them in order. As soon as one is met, you have determined the right side and can ignore all of the rest of the list.
They are as follows:
1. Pnimi Chitzoni - That is to say, you consider it as if you enter from the room which is closer to the Reshut Harabim into the room which is further from the Reshut Harabim. If this is equal then...
2. Flow of traffic - We look at what is the most common pattern of people who use these rooms. If that is equal then..
3. "Shimush" - If one room is used more for "living" than the other, then the Mezuzah goes on the right as you enter that room. If that is equal then...
4. Heker Tzir - We put the Mezuzah on the right of the room into which the door opens. (It is interesting to note that according to the Chabad custom, you look at Heker Tzir first and only afterward to the other criteria.
If you have looked at all of these criteria in order and the two rooms are still equal (which is a case I have never yet come across) then there is a Machlokes as to what you would do.
According to the Mikdash M'at you would put it on whichever side you like (he holds that the Torah only said to put it on the right to rule out putting it on the left but here there is no clear left)
The Sh'elat Yaavetz and Shearei Deah hold that you would put a Mezuzah on each side. Although you might worry that this is Baal Tosif, they say that it is not a problem since you are doing it to rule out a safek and you only have intention for whichever one is the correct one.
You can find all of the details of this subject in the Sefer Chovat HaDar by Rabbi Yaakov Yeshaya Bloi.