Solution (source code)

= Solution

At time two, <continuity> of the second temperature gives
$$
\theta_2(2)=(T_0-T_\infty)e^{-2a}-\frac{1-e^{-a}}a.
$$
The forcing then turns off, so <Newton's law of cooling> again gives exponential decay:
$$
\boxed{T_2(t)=T_\infty+(T_0-T_\infty)e^{-at}
-\frac{1-e^{-a}}a e^{-a(t-2)},\qquad t>2.}
$$
Subtracting this from the first temperature and expressing both corrections with the same exponential factor gives
$$
\boxed{T_1(t)-T_2(t)=\left(\frac{e^a-1}{a}-1\right)e^{-a(t-1)},\qquad t>2.}
$$
Because $e^a>1+a$ for $a>0$, this difference is positive. Thus the cup cooled instantaneously is warmer after the addition interval: its cooling occurred earlier and has undergone more subsequent exponential attenuation.