Welches Haus ist Ihrem gegenüber?
Which house is across from yours?
Is this considered polite (formal) or is this not even an issue in this sentence? I tend to think any possessive pronouns when capitalized means that it is part of formal speech.
It is indeed formal.
Welches Haus liegt deinem gegenüber?
Which house is across from yours?
Welches Haus liegt ihrem gegenüber?
Which house is across from theirs?
Brief question, longer answer:
(1) "Ihrem" is rather formal. This is used when conversing with interlocutors you are not too familiar with or in case you have failed to agree on saying "Du" so far. "Du" is the familiar way of addressing a person, "Sie" (and, in genitive case or related, "Ihr[...]") is the formal way).
The use of majuscules, however, is not a sufficient indication of formal speech. You may as well write "Du" with a cap (which I prefer and consider a bit more polite, but nevertheless it is still the informal variant). This, by the way, was a must-do in writing letters before the reform of German orthography some ten years ago. You cannot do anything wrong by writing "Du" in caps when addressing someone directly.
(2) The question will hardly be uttered that way. Chances are you will never come across that sentence in real life. For two reasons: In rather formal wording, "liegt gegenüber" is much more appropriate as "ist gegenüber" -- for buildings and estate, that is.
Second, "Ihrem gegenüber" is a construction hardly ever encountered in oral language, and this has been having an impact on the written register as well. So even though it is not wrong at all, it sounds a bit outdated. In spoken language, you will most probably hear utterances such as "Welches Haus ist auf der anderen Seite von Ihnen aus gesehen?" (which is longer indeed, maybe there are much shorter variants around, but I cannot think of a single one right now).
"Groß- oder Kleinschreibung von „sie/Sie“
Die Formen des Anredepronomens Sie schreibt man immer und überall groß und auch die Formen des entsprechenden Possessivpronomens
Except for the first word in a sentence the use of majuscules is therefore a proper indication of formal speech.
Well... As I already said, the Duden (and, more importantly, the reality of written German) also allows for the non-sentence-initial majuscule variant of "du" (i.e., "Du"). Of course, this can be considered a rather formal use of "du" as well, so you are right in a way, but there is a distinction between "Du" and "Sie" in terms of formality which is far greater.
Therefore: yes, it is necessary (to write formal addresses starting off with a capital letter), but no, it is not sufficient. Now I recall the question being "Can I take the capital letter as a reliable indicator of formality?" And here, the answer would be: In most cases, but not in all. So it is not a 100% reliable indicator. It works the other way round though: If you want to address someone formally ("Siezen"), you need to capitalise the word no matter what. But that is not what was asked (IIRC).
If you need a quote, here is one:
In Briefen kann »du« groß- oder kleingeschrieben werden: Liebe Maria, wie Du oder du bestimmt schon gemerkt hast …
This may also be applied to internet messaging to express a higher degree of esteem or just politeness, but it is mainly found in written letters (imho, the internet tends to do away with caps in general).
Since when is "du" formal?
In terms of relations:
Sie > Du / du
Du > du
where ">" is meant to indicate "is more formal than".
So "Du" is a way of writing "du" with a slightly more formal touch. But this does not mean that "Du" is in any way formal if you compare it to "Sie" (which is absolutely formal). The most fundamental differentiation between formal and non-formal (I'd rather not call it informal for reasons of logic) is along the du/Du - Sie divide.
Sorry, it has in no way to do with any kind of formality. Writing Du or Ihr instead of du/ihr in a letter or similar written form (email etc.) is simply a means of differentiating between the use for personally adressing someone and other uses of these pronouns (reported speech, adressing of multiple persons in advertisements, idiomatic use).
"... und dann sagte er: "Lauf so schnell du kannst...", kannst Du das glauben?..."
"Hej, du, bei IKEA ist jetzt Midsommar"
"... wie dem auch sei, das kannst du halten, wie ein Dachdecker..."
Sadly, nowadays it is only optional. But after it was compulsory before the Rechtschreibreform, then forbidden, they are at least halfway back with the update. ;)