InitialMessage Variable Value: “You searched for author William Shakespeare. His books can be found in the following stores: Bookland, The Bookshop, Downtown Books, Classics Bookstore.”
that syntax means, the text will be first splitted into array of string with “.” as a separator.
After this that one string will be splitted into 2 sections
then .First means the first array element will be picked You searched for author William Shakespeare.
then Substring will take a part of the above generated string
That will be Last index of author → that means the position of a (of author) in that sentence, that is 17 + the length of author word that is 6 → 17 + 6 = 23
Now that substring will take the above generated text and then fetch the part of that which s after 23 character position, that will give you “William Shakespeare”
you can check the below post to be aware and learn the basics