A man is sitting in a train which is moving. The man is
at rest with respect to a man sitting in the train next to him
in motion with respect to a man standing on the ground outside the train
In physics we deal with relative motion, that is, we study motion with respect to an observer. So, the first thing we need to do is to set an observer and study motion with respect to this observer which is considered at rest. Therefore,
(a) A man sitting in a train is at rest with respect to a man sitting in the train next to him.
(b) A man sitting in a train is in motion with respect to a man standing on the ground outside the train, because the train is moving with respect to the observer and so is the man sitting in it.