Two brothers who bashed a man coming to a woman’s aid on a train have been warned they could be jailed.