We can see things moving faster than light

Correct me here. If two objects are ten light years apart but the space between them is fixed then light leaving either object will take ten years to reach the other object? However if the objects are moving away from each other at say half the speed of light it would take light 15 years to leave one object and reach the other?  But would that not mean that at that point in time  when light from one object reached the other the two objects would be 15 light years apart? Or are you somehow reaching your answers similar to making the calculations based on the physics similar to throwing a baseball from a moving  train and calculating the distances and time required to reach another train depending on whether you are throwing the baseball in the same direction or the opposite direction the train is moving?