This is how it works

System A

System A:
The heated tap water goes to the boiler and the thermostatic mixer of the shower