Let the number of books each student donates be \( x \). Since there are \( Z \) students and they aim to reach a total donation of 300 books, we can express this as:
\[ Z \cdot x = 300 \]
Now, to find out how many books Hannah will have after the donations, we can add the number of books she currently has (127) to the total number of donated books (300):
\[ \text{Total books after donation} = 127 + 300 \]
Now, we simplify this expression:
\[ 127 + 300 = 427 \]
Thus, after the donations, Hannah will have \( 427 \) books in her collection.
To summarize:
Hannah will have \( 427 \) books in her collection after the donations.