Why are the endings in green so? What case are they (Accusative apparently) but why?

Она всю дорогу держала ребёнка на руках.