Path Integral Form with Path Tracing
Q1: how to represent path tracing as the first one...
Your materials have brought enough information, the first formula, quoted from your material, presents as

The path integral formulation of light transport formalizes the idea
by writing the camera response as an integral over all light transport
paths of all lengths in the scene, which given path encompasses

the “amount” of light emitted along the path,
the light carrying capacity of the path, and
the sensitivity of the sensor to light brought along the path.


Can't interpret the formula better
Q2: Should I generate paths for different lengths and do this procedure over and over...
Q3: ...randomly generate paths with different lengths and sum their estimate up since each length...
Quoted from your material,

The Monte Carlo integration procedure consists in generating a
‘sample’, that is, a random x-value from the integration domain, ...

I can't say the second one is a formula, it is just the Monte Carlo estimator of the path integral formulation of light transport or it is just a method for programming the formulation; or course you could have other methods.