Well, the biggest object with both of them is the boat and when the alligator spotted such a large blue object behind the red boat, he went to attack them.
Because his second training learns him that he should not attack red with a bit of blue, but the opposite.
the Inventor