person P is pulling block B by a massless rope R … Why does R accelerate? (emphasis added)
The rope is taken to be massless, so no force is required to accelerate it. By $\vec F_{net}=m\vec a$, if $m=0$ then $\vec F_{net}=0$ for all $\vec a$. So you cannot use Newton’s 2nd law to determine the acceleration of a massless object. That information must come from something else.
In this case, the right end of the rope is attached to the person so the right end of the rope has the same velocity as the person. Furthermore, the left end of the rope is attached to the block so it has the same velocity as the block. Finally, the rope is inextensible which means that the left and right ends must have the same velocity. These constraints require the rope to accelerate to match the other objects (and require the other objects to accelerate together).
So it is the constraints that determine the acceleration of the rope, not Newton’s 2nd law. The acceleration is compatible with Newton’s 2nd law, but the law is not sufficient to determine the acceleration. This is generally true for massless objects.