Let's take an example, where A is a photon moving with the speed of light, and B is a car, that moves with half of the speed of light
At t=0, a kid in B(thinking that the car is not moving) observes that B is 4.5 million kms away from A(initial position of the photon=4.5 million kms), and both start to move towards each other. After 1 second on the kid's watch, he observes that he and the light are in contact, so that would mean the distance between them is 0 kilometres, so he would consider the final position of the photon=0km
So if he calculates the speed of the photon, by using: (initial position-final position)/time taken, i.e, 1 second on his watch
Won't he get (4.5*10^6)/1 =4.5*10^6km/second?
What else needs to be considered in this calculation?
Edit: Most of you must be downvoting because I haven't considered the time dilation. But the time dilation again is built on the fact that the speed of light is constant, isn't it?