Answer
See work below.
Work Step by Step
a. The gas is well-insulated, which means no heat flows in or out. Q = 0. When the gas is compressed, work is done on that gas, i.e., W is negative. The gas gains energy - the gas particles move faster, and the temperature of the gas increases.
b. When the gas expands under these conditions, the opposite happens. The gas does work on the surroundings, and W is positive. By the first law, or conservation of energy, the energy of the gas decreases. The gas temperature decreases.