Right answer:
estudiábamos
Estudiábamos is the conjugation of the regular verb estudiar that matches the first person plural in the imperfect tense. In general, the imperfect is used to talk about past actions, conditions, or events that occurred regularly or frequently or that were in progress in a moment in the past. Estudiar is an ar verb. Since this sentence matches the first person plural, remove the ar ending and add ábamos to the end of the word. Finally:
Nosotros estudiábamos juntos en la biblioteca de la escuela.