Tracking beginning of the light path
Rendering doesn't work like that. Tracking only 1 light path would give a very bad representation of the scene and would be inaccurate.

Each pixel is an origin for infinite amount of light paths leading into different light sources, each bounce determined by probability. Rendering infinite samples is not doable, so the more samples (light paths traced), the better the image (better representing the scene).

There are 2 approaches you can go:


Render the image in N-dimensional color space, N being the number of light sources, each light-source being monochromatic only. Render as many samples as you can. Each pixel's color will exactly correspond with what light influenced it.

My guess is you will have to compile your own Cycles for this.
Render the image multiple times, one light source at a time. This can be scripted with python, or even done by animating the lights and rendering N-frames long animation, where N is number of lights. Each frame will be an exact map of how that light influences the scene.