What is the function of 乃 in 子甫至乃去乎 ? i understand: 
子甫至 - you just arrived a moment ago.
去 - go.
乎 - character that makes the sentence a question.

What is the role of 乃 in this sentence?
乃, also means 就, which means "about to" in your sentence.

You arrived just a moment ago, and about to go just like that?