This is figurative language because a rock can’t actually be a petrified brain. This is also figurative language because the author was using like in the sentence.
Another example of how the author used figurative language is “As if the desert stood dead in its tracks with fear when it saw the water” This is an example of figurative language because the desert can’t stop dead iits tracks