I was thinking of a world in which there are two different countries that are in the exact same location at the same time. Despite being in the same location these two countries speak different languages, have different cultures, different types of government, and different laws. What effect would this have on the people living in the two different countries that are in the exact same location? How would the two countries distinguish who is from which country when the two countries are in the same place and time?
With two nations (Red and Blue in this post) and two sets of laws, both peoples would essentially walk around with diplomatic immunity in the other nation. There would need to be a carefully negotiated set of shared laws regarding common land like streets, as well as for transfer of people and property from one nation to the other and for transgressions by a citizen of one nation affecting one of the other.
Example time: - The Reds have a democracy, are allowed to own (Red) slaves and duel each other to death at a moment's notice. - The Blues have a monarchy, have any violence punishable by long imprisonment and can only own property through their birth or adopted clans.
- On the street, Reds and Blues can tell each other apart by dress and speech. Still, Red law requires Reds to verify the passport of any duel opponent before engaging.
- If a Red shoots a Blue, he would not be imprisoned (immune to Blue law) but have to pay compensation to the clan of the Blue (shared law).
- If a Red shoots another Red without following duel laws, he would become the slave of the victim or his heirs (Red law).
- Reds prefer to hire Blues for some jobs (because no duels), but the salary has to be paid to the clan (shared) and the Blues just don't show up on Blue national holidays.
- It is possible for a (free) Red or Blue to change Nationality, but a Red needs a Blue clan adopting him and a Blue will only possess what the old clan gives to him right after the switch.
- After changing nationality a person is required to wear a large badge of the new nation to prevent misunderstandings. New Reds only gain voting rights after 5 years.
Edit to address some comments:
I'm trying to describe a stable scenario where the two countries coexist in the same location.
If both laws applied at the same time, there would be immense pressure to synchronize them, and the governmental bodies with this authority would together be a de facto single government. Just imagine that Red laws say you must wear purple outside and Blue law says only the king may wear purple...
If private terrains and buildings applied only the laws of the owner's nation, then it would be a patchwork of two nations with neutral streets and painted lines every to mark the borders. Does it still count as in the same location then?
For stability law officers would have the authority to detain people of the other country, but only to transfer them to those of the other country.
This was quite common in mixed areas in the past. E.g. the Jews, Muslims and Christians had their own judicial systems, and were pretty much independent, as long as they recognized the allegiance to the sovereign - the very idea of a "country" was somewhat loose.
This continues till today in some areas, the Māori have some weak form of separate self-government (e.g. different electorates), and some of the Indian "Nations" in the USA are de iure fully sovereign and independent (as long as they do not try to exercise their rights too much), their territory and political system coexisting with the "non-native" administrative divisions.
Peter LeFanu Lumsdaine mentioned the book "The City and the City" in a comment. If you haven't read the book itself, you should at least read the Wikipedia entry. The author has put some thought into these matters.
Telling people apart will be easy, because people will want to told apart.
The easiest way for people to proclaim their nationality will be by their clothing. In addition there will be hair/beard style, eating habits, who you greet on the street and how you greet them. And so on and so forth.
For somebody to disguise themselves as belonging to the other nation would probably be illegal or at least socially very unacceptable.
As you say, each nation will have their own government and laws. This can work well, as long as most people obeys their own government and the two governments have peaceful relations. A war between them would be ... ugly.
One thorny issue will be jurisdiction. An A-lander accuses a B-lander of a crime. Should this be investigated by the A-police or the B-police? It could depend on where the alleged crime happened... but that might not be entirely clear. Many interesting stories could result.
International law is in general a difficult subject, especially when involving international corporations. Just look in any newspaper for inspiration. E.g. you could let one country be used a tax haven by corporation from the other.
Countries (political/national/ethnic groups going hand-in-hand with a physical area) is in my opinion a fairly modern invention that has never been without exception in practice. Ethnic german-speaking Germans are also found in other countries (where their ancestors may have lived for centuries without the desire to move to Germany - e.g. Austria), while people of other ethnicities hold German citizenship. (Historically, Germany consists of many different "states", which contains even more diverse tribes, which in some respects are distinguishable even to the present day by speech and physical appearance.)
So "groups" could easily form with their own culture, rules and enforcement of those, dress, habits, etc. without a physical land area (except maybe the part that each individual incidentally owns). The internet may provide even more opportunities for new groups to form and organize themselves than before.
Some interesting permutations would involve people being part of a distinct subgroup within a wider country, so being subject to both the group's and the country's laws (Indian reservations vs United States?) while others in the same country are only beholden to the country's laws.
I guess not much prevents a person of finding himself a member of more than one group, perhaps having to adhere to conflicting rules at some point....
In the purest sense, I think overlapping governments is impossible. I can only imagine three possible scenarios:
The overlapping governments are fully independent, with no coordination. Chaos results: a given act might be felonious or completely legal depending on who's looking; public projects like road maintenance or water and power distribution collide; police jurisdictions conflict. If you do something that's illegal in both nations, whose job is it to punish you? This situation is a powder keg that almost naturally devolves into war, ending in separate territories at best.
The overlapping governments work together in harmony. In so doing, a single government is formed. Even if one citizen may be subject to different laws from those affecting another citizen, both citizens are governed by the same entity. Public works are coordinated so that both governments aren't trying to solve the same problem at the same time in different ways. There is one governing body that determines which rules a given citizen is elligible to live by.
The overlapping governments are extremely lax. There is little or no law enforcement, so nobody cares whose laws you might be breaking. Such a system would only avoid devolving into complete anarchy (zero government) if the people held themselves and each other to the law as a matter of honor and pride. Without a structured system to hold people to the letter of the law, the separate groups would meld ideologies into one simple, common sense code of honor supported by communal punishment.
It would be difficult to reliably, fairly determine which nation's laws should apply to a given individual, too. Culture won't work, as clothing, language, and behaviors are easy to fake or adopt, and tastes vary wildly even among people in the same culture. Tattoos can be modified or removed. Even genetic distinctions and lineage are ultimately useless, as inevitable intermarriage will mix gene pools and blood lines.
Note: this answer assumes equality is intended. There are plenty of ways an unfair or unbalanced system would allow two nations to share the same space. As others have said here, see the real world for examples of that.
What about Belgium? There are Wallon (French influence) and Flemish (Dutch influence) cultures that very closely overlap. As far as I know, they don't have separate governments (possibly different local government councils?) or judicial systems, but they do have their own cultures to a certain degree. I don't really know too much about it, but might be worth asking a Belgian, or taking a vacation there.
As a historical example of something very similar, territory nominally falling under Roman rule usually retained the local form of government. However, Roman citizens were not subject to that government, and the Romans set up governorships of the various nations they conquered to handle Caesar's interests within that nation.
It's somewhat similar to the U.S. system of state and federal governments having some separation of powers, but with the key difference that someone born in the District of Columbia would be immune to prosecution under state law, answerable only to the Feds for any infraction.
Most real-world examples of two jurisdictions coexisting typically involve one jurisdiction having a wider geographic scope, and natives of the region fall under both jurisdictions.
If they were unaware of each other, they would be effectively isolated from each other. Like the different "phasing" in the Stargate series or something. Alternately, if the different kinds of people are physically incapable of communicating because they're different species. Like one species is deaf and uses visual communication while the other species is blind and uses audio communication.
If you're talking about normal humans, it would be pretty difficult to avoid contact. However, we do have precedent in many cases with various types of racism. Blacks and women have in many cases had different cultures and a different set of laws applied to them. I'm sure there are other examples of similar cases in the past.
As long as you're not trying to keep things equitable, it's not hard to have similar sets of cultural schisms in play.