For (a)

contains 3 equivalence-classes. If we have 2 numbers such that that is mod 3.

Hence by the pigeon-hole principle we must choose numbers from such that at least 5 of these numbers are in the same residu-class modulo 3.

For (b) that must be since contains k residu-classes.

Or did I misunderstand your question perhaps?