Consider one complete clock cycle:
Half 1, clock signal is 1:
Latch A value is protected.
Latch A value is passed to latch B.
Latch B value becomes input to the logic circuit.
Half 2, clock signal is 0:
Latch B value becomes protected.
Latch A becomes enabled for writing and accepts the output of the logical circuit.