Police responded to fears about Anthony Williams on a train the day before the attack, jurors hear.