Lester Del Rey wrote a book "Tunnel Through Time" where the time machine created a tunnel that was visible as a rainbow ring. The first man through "Doc Tom" did not come back and a pair of teen sons of the scientist who made the tunnel and Doc Tom go back to find them - to the age of the Dinosaurs
Turns out there are some glitches - the tunnel entrance moves somewhat each time, and sometimes appears on water where it can't be got at. The boys find Doc Tom, but when the rainbow ring meets the land it comes in next to a brontosaur who steps into it and gets chopped up and damage the equipment.
The damaged ring can only take some of them, part way back so the kids go ahead, but land in the Ice Age and aren't ready for the blizzard. They find a cave and the shelter gets warm when a mammoth sleeps across the entrance. They nod off, and almost freeze to death when the Mammoth leaves. Doc Tom finds them first.
The next jump goes to an interglacial time, and they meet primitive humans. They befriend a girl who calls Bill 'Bie', Pete 'Pie' and Doc Tom 'Die Tie'. The girl has seen the ring before and they use her info to guess where it will be next. Their village is attacked by another tribe (not Nieanderthals though) and they are in trouble but the ring arrives and they all leap through (including the girl). She is so frightened by the present world that she jumps back, but they figure that the drift of the ring would have carried her away from the hostile tribesmen.
I don't recall the 'must kill' incident, so this might not be the book, but the Rainbow Ring name of the time device rang a bell. It is a young adult book so it might be remembered as a short story.