To answer your first paragraph: from the perspective of quark A, quark B is stationary as they are traveling at the same velocity, since gluons are massless they travel at "c", and so from the perspective of quark A the gluon reaches quark B at the same time it "normally" would, as if the proton were not moving at all relative to the observer.
What you are describing would only be an issue if there were some sort of universal reference frame, which there isn't, the speed of light is constant for all observers regardless of their reference frame's velocity relative to other observers. Because of this, the quarks communicate their forces just as they would "normally" from the reference frame of the proton, the "stationary" reference frame observes a time dilation in the protons reference to account for the relative velocity.
Quantum chromodynamics is a subject in which I would surmise none of us are expert.
That being said, quarks are known by particle physicists to have mass. (This mass arises by the Higgs mechanism). Therefore quarks do not move at the speed of light. Gluons however are believed to be massless and are demonstrated by experiment to have mass less than 1.3 meV, which is a very small amount.