The LM317 itself it not connected to ground.

The Vout is regulated to 1.25V higher than Vadj.

The output voltage is set higher than 1.25V by lifting the Vadj above ground level.

The voltage over R1 is always 1.25V. The current through R1 is 1.25/R1.

That same current has to go through R2. Also the current of the LM317 itself is going through R2, but that is only 50uA, so that is not in the formula.

If R1 = 100 ohm, and R2 = 200 ohm. The voltage over R1 is 1.25V and over R2 is 2.50V. The output will be 1.25+2.50 = 3.75V

So it does not use the voltage divider rule in this case?

And the inside of the LM317 is a non- inverting op amp right?

Similar to this: http://yano.wasteonline.net/electronics/opamp/index.php?mode=1

Where Rg is R2, Rf is R1 and Vin is the reference voltage of 1.25V.

Then what is the Voltage at V-? Is it 1.25V also? If so, why?

And from which law is the formula obtained?

Thanks