How does the sentence end?

In class Patricia talked back to Kayla the teacher when she asked her to do something, so
Kayla gave detention.