Breakdown of A sala em que estudamos fica perto da biblioteca.
Questions & Answers about A sala em que estudamos fica perto da biblioteca.
Because the idea needs the preposition em: you study in a room. In Portuguese, when a relative clause needs a preposition, the preposition stays there:
a sala em que estudamos
So this is like the room in which we study. Using only que here would not be standard.
Because Portuguese often leaves out subject pronouns. The verb ending already shows the subject.
Estudamos already tells you the subject is we.
You can say nós estudamos if you want emphasis or contrast, but it is not necessary here.