Can you please check these sentences, too? Thank you.

1) My friend was very upset because someone had stolen her bag before I saw her.
I was waiting for the bus when I heard someone call my name.
2) I got home at half past four and immediately did my homework.
We .................. (sit) in the sun for about an hour when we suddenly realized that we .............. (get burnt). (We had been sitting in the sun........ we were getting burnt). Is it the only possibility??
Which is the girl who/ that lives next door?

1) OK

2) I got home at half past four and immediately did my homework.
We .................. (sit) in the sun for about an hour when we suddenly realized that we .............. (get burnt). (We had been sitting in the sun........ we were getting burnt).
We were sitting in the sun ...
(Either tense will work fine.)

Which is the girl who lives next door?

Sure! Let's check these sentences:

1) My friend was very upset because someone had stolen her bag before I saw her.
This sentence is grammatically correct and conveys the intended meaning.

"I was waiting for the bus when I heard someone call my name."
This sentence is also grammatically correct and conveys the intended meaning.

2) I got home at half past four and immediately did my homework.
This sentence is grammatically correct and conveys the intended meaning.

"We .................. (sit) in the sun for about an hour when we suddenly realized that we .............. (get burnt). (We had been sitting in the sun........ we were getting burnt). Is it the only possibility??"
Based on the context, the correct form of the verbs would be:
"We were sitting in the sun for about an hour when we suddenly realized that we were getting burnt."

Regarding the last question:
"Which is the girl who/ that lives next door?"
Either "who" or "that" can be used in this sentence, depending on personal preference or style. Both options are grammatically correct.