While studying special relativity at Khan Academy (a website) they took an example where a person was at the centre of an inertial frame of reference and was at rest and exactly at time equals 0 a friend passes him who was seating in a space ship which was moving in the positive $x$ direction with a velocity equal to $0.5c$ and exactly at time equal to 0 the person and his friend turn on the flashlight in the positive $x$ direction. Now when we plot a graph where $x$-axis stands for distance and $y$-axis stands for time, in his frame of reference and examine the graph we observe that the light from his flash light is slower than that of the light from his friends flash light. According to the observations of the universe this is contradictory as light is observed to move with the same velocity no matter in which frame of reference it is observed. But, my question is that as the velocity of other objects in the universe is negligible in front of light and so do not affect lights velocity but do even the higher velocities will not affect light's relative velocity and if not then why velocity of light is absolute? And why are space and time are not absolute?
Congratulations, you have arrived at one of the most fundamental questions in modern physics!
Many people will have their own interpretations of "why velocity of light is absolute?" I think most physicists would probably say that this is an axiom of the Theory of Special Relativity and not something that we take as irrefutable. Einstein arrived at this conjecture by noticing that the electromagnetic wave solutions to Maxwell's equations have a velocity that is not dependent on anything other than fundamental constants of the universe, and so it must also be a fundamental constant. I take as evidence two classes of experiments that have been performed over the last century.
1) Within experimental uncertainty we have never measured the speed of light in vacuum to be anything other than c, and we have never measured particle velocities faster than this value.
2) More importantly in my opinion, many measurements of the properties matter traveling at high speeds in the lab frame have confirmed the predictions of Einstein's theory, which is predicated on the constant value of the speed of light.
This means that space and time are not absolute, which is an unfortunately reality for those of us who like to rely on the physical intuition we've developed through normal (sub-light speed) experiences.
That being said, I should also note that there are still plenty of efforts being made to understand our observations of the universe at a large scale which do not take the speed of light in a vacuum to be constant in all situations. However, to my knowledge, none of these newer theories has been able to offer a testable prediction that would cause us to rewrite modern physics textbooks on this matter.