When the temperature of a body and its surrounding medium are different, then heat transfer takes place between them.
The direction of heat flow depends on the surrounding temperature with respect to that of body.
In given case, the ice-cold water having lower temperature than the surrounding, when left on a table on a hot summer day takes heat from surrounding and warms up, whereas a cup of tea having higher temperature than surrounding cools down by releasing heat to surrounding.
Thus, both the statements given in options (a) and (b) are correct.