On a Heat Exchange Problem under Sharply Changing External Conditions