Rearrangement of an oxyallyl cation
Count carbon and oxygen atoms in the book's answer versus the original molecule, and infer that the book got it wrong.  One of the carbon atoms in the book's answer should be oxygen.  Question for you:  Which one?