A transport must be escorted for its entire move in order to be exempt from sub attacks. In case 1, the battleship escorts both transports to sea zone B, then leaves one at its destination and continues with the other to sea zone C.
In case 2, the transport going to C is not escorted because it made part of its move without the battleship. They were not traveling together, therefore they are separate groups. They just happened to be in sea zone B at the same time.
In order for a warship to be considered an escort, it must be dedicated to that task, not just be in the same sea zone. This dedication is indicated by the fact that the warship accompanied the transport for the transport’s entire move.