how the circuit worhs,how the relationship between output and input is calculated and derived.
Vout = Vin × （R5+R4R）/R4;
This is a composite amplifier , and U2 is first stage as a error amplifier, U1 is second stage for output.
The circuits is not stable in practice, it may oscilate.
As usual I will design a integrator for the first stage, the RC of the integrator will solve the stability of the circuits. Like this: