It will have travelled ct, where t is the time. But of course that depends on how you define the "distance". If you measure distance by the distance between the source and the receptor at the time of reception, it will clearly depend on the motion of the source and receptor.
Anyway, lets set up a specific situation. Design a ruler (eg a bunch of Aluminum atoms bound together) and a set of clocks one at each end of the ruler. Synchronize the clocks (e.g. by slow motion of the clocks from one end to the other) then you will find that the time it takes for the light to go from one end of the ruler to the other is c. If you have a very long ruler, then all of the local gravitational fields can distort the ruler, and the can also alter the rates of the clocks, and you have real trouble defining what you mean by both distance and time.
The "speed of light" is a useful concept locally (i.e. on the scales on which you can construct rules which are roughly stiff, and on which you can synchronize clocks by, say, slow transport.) On larger scales, rules become floppy and stretchy, and clock synchronization depends on the path you follow etc., so that the large scale velocity of light becomes unclear. Further adding to the confusion is that on large scales, one has caustics-- the light sphere expanding from a point begins to fold over on itself and light rays cross. That is: there really is no global notion of the speed of light.
In the '70s Penrose pointed out that if, say, the Starship Enterprise were informed by a spy that at 9:00 a Klingon bomb would go off a distance from a planet that the Enterprise was orbiting, could they, leaving at 9:00, escape the blast. The answer is no. Even travelling directly away from the point of the blast at the speed of light, the blast wave would catch up with them. The light cone of the blast completely envelopes the light cone of any point closer to the star which is emitted at the same time because of those caustics and the different rates of the flow of time at various points in a gravitational field.
The expansion of the universe is the least of the worries, especially since the universe is not homogeneous and isotropic. It is all lumpy and the gravitational field is far from smooth. The uniform expansion is a property of a homogeneous and isotropic universe. Thus within our galaxy say, the universe is not expanding. Local inhomogeneities dominate the gravitational field. Only on average on the very very large scale can one start talking about expansion of the universe (scales larger than galaxy clusters, or times way in the past, when the inhomogeneities were small).