A straightforward solution:

1. Split the string along the white space.
2. Store the resulting word-strings in an array (or linked list, I dunno what they've taught you yet).
3. Get the users choice.
4. Iterate over the array/list, using simple string comparisons to search for the user's chosen word.
5. Replace the chosen word (in the array/list) with a new one.
6. Reassemble message.

Easy enough.