Perception of light speed when traveling between two light sources I'm struggling with a fundamental understanding of time dilation and special relativity (if I'm correct).
Many online sources explain it as the following:

With the ship moving away from the lightbeam it would perceive this as moving slower than c. However, at these relative speeds time slows down on the moving ship, leaving it to perceive the light as traveling at c.
But following that, imagine this expanded analogy that would include multiple light sources.

With the light from andromeda moving towards us we would have to speed up time to perceive it as traveling at c. However this conflicts with the light beam traveling from behind us. How can we perceive both these beams of light as traveling at c?
It's likely there are many sources online explaining this well, however I've been unable to find them. If anyone here can point me in the right direction that would already mean a lot to me.
Thanks in advance!
 A: It's always tricky to gain physical understanding using time dilation/ length contraction without talking about relativity of simultaneity. It is actually this last phenomena that truly helps preserve the speed of light after switching inertial frames.
Mathematically, this is all encapsulated in the Lorentz transformation. Say the star uses the reference frame $(x,t)$ and the ship uses $(x',t')$, and it is moving at velocity $v$ with respect to the star. The transformation now reads (with $\gamma = 1/\sqrt{1-v^2/c^2}$):
$$
x' = \gamma(x-vt)
$$
$$
t' = \gamma(-vx/c^2+t)
$$
(sanity check: $x'=0$ corresponds to the wordline $x=vt$) or conversely:
$$
x = \gamma(x'+vt')
$$
$$
t = \gamma(vx'/c^2+t')
$$
The fact that $t'$ depends on $x$ as well is the matheatical translation of relativity of simultaneity, while the extra $\gamma$ factors translate time dilation.
A light path has the world line $x=\pm ct$, plugging in the Lorentz transformation, this becomes $x'=\pm ct'$, so you recover your result. You'll notice that in the end, time dilation did not play an important role at all.
You can visualize these abstract calculations with a nice space-time diagram, but MinutePhysics already does a very good job at illustrating it in its SR playlist. Hope this helps and tell me if you find some mistakes.
A: The problem with this question is it imbues special meaning to the light's source. That is important when doing astronomy and spectroscopy, but this is not that. The problem is that it implies there is a natural rest frame: the rest frame of the source. This will only cause confusion.
A photon (or classical plane wave) moves through spacetime at $c$ for all observers, period. In a given inertial frame it can be described by a 4-wave vector:
$$ k^{\mu}=(\omega/c, \vec k)$$
but the frequency and wavelength are not Lorentz scalars: they depend on the observer's frame.
A lone photon from the Andromeda or the Milky Way doesn't have frequency or wavelength, but it does move at $c$ in all frames.
A: The explanation you have quoted is quite misleading- time dilation cannot account for the constancy of the speed of light in all directions. As @lpz mentioned, the effect responsible is the relativity of simultaneity, and I urge you to focus on it until you are really clear about it, as it is the most important, and most often misunderstood, aspect of SR. Overlooking the effect of the relativity of simultaneity is the cause of most of the famous 'paradoxes' of SR.
Suppose you and I are moving relative to each other. For me, if it is 10.30 on my watch, it is 10.30 everywhere. 'Now' for me is a flat slice through spacetime. However, in your reference frame, my flat slice through spacetime is a sloping one, with the slope rising in your direction of motion. My time is out of synch with yours, and the effect increases with distance along our direction of relative motion.
To see how this accounts for a constant speed of light, imagine that you and a friend are standing half way between two detectors, one a light second away to the east, the other a light second away to the west. The detectors have timers which are synchronised with your friend's watch.  At 12:00:00 your friend flashes a light. Exactly a light second later, at 12:00:01, the flash reaches each of the detectors, the speed to light being the same in both directions.
Now, suppose the moment your friend flashed the light, you has started walking to the east at two metres per second. How would the results of the experiment look to you? To the east, in your direction of motion, the detector fired after the light had travelled two metres less than a light second, while to the west the detector fired after the light had travelled two metres more than a light second. In your frame, the two detectors must have caught the flash at different times: the east detector caught it a fraction before 12:00:01 and the west detector caught it a fraction after 12:00:01. In other words, you and your friend disagree about what time it is at each of the detectors. From your perspective, the clock on the east detector is running slightly ahead of the real time in your frame, while the clock on the west detector is running slightly behind the real time in your frame.
