Darren Pencille told his former partner "I've done something bad" after stabbing a train passenger, a jury hears.