The underlined phrase in the task content whose function is to be identified is; Craving a more cosmopolitan lifestyle; and it's function is as an infinitive.
It follows from the complete task content that the sentence given is; Craving a more cosmopolitan lifestyle, the rural students were excited to travel to the city and the underlined phrase is; as underlined above.
Since, an infinitive is basically the form of a verb, having no tense and in addition, not being conjugated. An infinitive is characterized by the fact that it's being preceded by the word to.
Hence, it follows that the underlined phrase; to travel is an infinitive.
Read more on infinitive;
https://brainly.com/question/449147
#SPJ1