What is the purpose of the trip?

Literal

Trip [possessive-の] purpose [topic-は] what is [question-か]?

旅行の目的 (purpose of the trip) is a common compound. 何ですか is the standard polite question form. Likely a customs or administrative context.