Answer: 18
Explanation:
Let x represents the number of exercises she had for homework.
Then, the expression for the number of exercises she did during study period =

Remaining exercise =

The number of exercises she did while waiting for a friend after school=

Also, she had three to finish at home that evening.
Then, we have

Hence, she had 18 exercises for homework.