The teacher returned the homework. The teacher noticed the error.(complex sentence)
The teacher returned the homework when/after she/he noticed the error.The teacher, who noticed the error, returned the homework.
The teacher returned the homework. The teacher noticed the error.(complex sentence)
The teacher returned the homework when/after she/he noticed the error.The teacher, who noticed the error, returned the homework.