If you were able to travel at the speed of light, the concept of time would not apply to you. According to the theory of relativity, as an object with mass approaches the speed of light, its relativistic mass increases infinitely, and it would require an infinite amount of energy to accelerate it to the speed of light. Therefore, it is impossible for an object with mass to reach or exceed the speed of light.
However, if we assume a hypothetical scenario where you could travel at the speed of light, the concept of time dilation comes into play. From your perspective traveling at the speed of light, time would effectively stand still. This means that the entire journey of 2.5 million light-years would appear to happen instantaneously for you.
However, from the perspective of an outside observer, the journey would still take 2.5 million years to complete. This is because, according to the theory of relativity, time dilation causes time to pass more slowly for objects moving at high velocities relative to a stationary observer.
Therefore, even if you were able to travel at the speed of light (which is not possible for objects with mass), it would still take 2.5 million years from the perspective of an outside observer for you to traverse a distance of 2.5 million light-years.