Answer:
I will show you the right conjugation of the verbs for each sentences:
Preterite forms of SER and TENER:
Sentence Nº 1: estuve
Sentence Nº 2: tuvo
Imperfect forms of SER, IR and HACER:
Sentence Nº 3: era
Sentence Nº 4: iban
Sentence Nº 5: hacia
Step-by-step explanation:
Spanish has two differet ways to express past tense. These are: Preterite or simple past and Imperfect. Both of them show actions or situations in the past.
Preterite is used to express an action or condition prior to the time it is expressed. It shows something that it is already over or finished and it is not going to happen again. For example:
I was at the airport yesterday from 2 to 4 pm (Yo estuve en el aeropuerto ayer desde las 2 hasta las 4 pm). This is a situation that it is already finished, then I used "estuve" instead "estaba". Estuve is preterite and Estaba is imperfect, in English both forms mean I was.
Two first sentences in this question require the use of Preterite becuase they show actions in the past and they are not going to continue. Let´s see more details of this:
Sentence Nº 1: Yo estuve en la clase hoy (I was at class today). This action is already finished. It showed where the person was today, anything else.
Sentence Nº 2: Anoche ella tuvo que estudiar mucho (She had to estudy a lot last night). This action is over. She studied a lot but only last night, then it is needed to use preterite (she had = ella tuvo).
On the other hand, Imperfect is the tense of a verb that shows, usually in the past, an action or a condition as incomplete, continuous or coincident with another action. It is usually used to describe what happens in the past. For example:
I was at the airport when airplane arrived (Yo estaba en el aeropuerto cuando el avión llegó). In this example I am describing what happened when I was at the airport, then I used imperfect (estaba) instead preterite (estuve).
Three last sentences showed in this question used Imperfect because they are showing actions of situations continuous or they are describing what happened in the past.
Sentence Nº 3: Ella era muy trabajadora cuando era niña (She was a hard worker when she was a child). In this sentence, we are describing how was the girl when she was a child, then it is used Imperfect.
Sentence Nº 4: Ustedes siempre iban a la clase a tiempo (You always went to class on time). It is describing a situation in the past.
Sentence Nº 5: Hacia mucho calor en la playa (It was very hot at the beach). This sentence is describing the weather at the beach in the past, however this is not over, maybe in the future the weather at the beach is hot again, so it is a continuous action.
Remember use Preterite when action is over and it is not going to happen again and use Imperfect to describe actions in the past.