Yes, it's all about the
relativity of simultaneity, you have to take into account the idea that each observer measures the difference in time between the beginning and end of the photon's journey using a pair of clocks, one at the position where the photon started and one where it ended, with the two clocks being "synchronized" in that observer's own rest frame. Then you have to realize that two clocks which are a distance x apart and synchronized in their own frame will be out-of-sync by vx/c^2 in a frame where they are moving at speed v along the axis both of them lie on. Here's a numerical example I came up with a while ago showing how if you take into account time dilation, length contraction, and the relativity of simultaneity, you do find that both observers measure the speed of the photon as c:
Say there's a ruler that's 50 light-seconds long in its own rest frame, moving at 0.6c in my frame. In this case the relativistic gamma-factor (which determines the amount of length contraction and time dilation) is 1.25, so in my frame its length is 50/1.25 = 40 light seconds long. At the front and back of the ruler are clocks which are synchronized in the ruler's rest frame; because of the relativity of simultaneity, this means that in my frame they are out-of-sync, with the front clock's time being behind the back clock's time by vx/c^2 = (0.6c)(50 light-seconds)/c^2 = 30 seconds.
Now, when the back end of the moving ruler is lined up with the 0-light-seconds mark of my own ruler (with my own ruler at rest relative to me), I set up a light flash at that position. Let's say at this moment the clock at the back of the moving ruler reads a time of 0 seconds, and since the clock at the front is always behind it by 30 seconds in my frame, then in my frame the clock at the front must read -30 seconds at that moment. 100 seconds later in my frame, the back end will have moved (100 seconds)*(0.6c) = 60 light-seconds along my ruler, and since the ruler is 40 light-seconds long in my frame, this means the front end will be lined up with the 100-light-seconds mark on my ruler. Since 100 seconds have passed, if the light beam is moving at c in my frame it must have moved 100 light-seconds in that time, so it will also be at the 100-light-seconds mark on my ruler, just having caught up with the front end of the moving ruler.
Since 100 seconds passed in my frame, this means 100/1.25 = 80 seconds have passed on the clocks at the front and back of the moving ruler. Since the clock at the back read 0 seconds when the flash was set off, it now reads 80 seconds; and since the clock at the front read -30 seconds, it now reads 50 seconds. And remember, the ruler was 50 light-seconds long in its own rest frame! So in its frame, where the clock at the front is synchronized with the clock at the back, the light flash was set off at the back when the clock there read 0 seconds, and the light beam passed the clock at the front when its time read 50 seconds, so since the ruler is 50-light-seconds long, the beam must have been moving at 50 light-seconds/50 seconds = c as well! So you can see that everything works out--if I measure distances and times with rulers and clocks at rest in my frame, I conclude the light beam moved at 1 c, and if a moving observer measures distance and times with rulers and clocks at rest in his frame, he also concludes the same light beam moved at 1 c.
If you want to also consider what happens if, after reaching the front end of the moving ruler at 100 seconds in my frame, the light then bounces back towards the back in the opposite direction towards the back end, then at 125 seconds in my frame the light will be at a position of 75 light-seconds on my ruler, and the back end of the moving ruler will be at that position as well. Since 125 seconds have passed in my frame, 125/1.25 = 100 seconds will have passed on the clock at the back of the moving ruler. Now remember that on the clock at the front read 50 seconds when the light reached it, and the ruler is 50 light-seconds long in its own rest frame, so an observer on the moving ruler will have measured the light to take an additional 50 seconds to travel the 50 light-seconds from front end to back end.