1. It appears that there has been a mistake.

2. There appears to have been a mistake.

3. It happened that she was out when we called.

4. She happened to be out when we called.

5. It chanced (that) they were staying at the same hotel.

6. They chanced to be staying at the same hotel.
---------------------------------
Is each pair the same and grammatical?

Each pair means the same thing, but 3 is wordy, and 5 and 6 are awkward. I've never heard anyone use the phrasing in 5 or 6.

Yes, each pair of sentences is grammatically correct and conveys the same meaning.

In each pair, the first sentence uses the phrase "It appears that" or "It happened that" as an introductory phrase followed by a subordinate clause, while the second sentence simplifies the construction by using the verb "appear" or "happen" directly with the subject. The meaning remains the same, indicating that a mistake occurred or something coincidental happened.

So, both forms can be used interchangeably, and the choice between them depends on personal preference or the required style.