What does this part of a circuit with two NPN transistors do?
To get constant speed from a PMDC brushed motor, you regulate the back EMF.

To measure this you need to subtract the voltage drop in the motor's internal resistance from the voltage seen on the motor terminals. You can get that voltage by Ohm's law if you know the current through the motor.

R571 measures the motor current. The chain R566-R567-R568 measures the voltage across the motor-R571 combination, and TS451 compares some fraction of the total voltage against R571 + V_be. When the motor voltage is too high TS451 conducts more, and this reduces the current available for TS452 base, which reduces the current it passes.