[2] Such an idealized process is a succession of physical equilibrium states, characterized by infinite slowness.
In other words, when an equation for a change in a state function contains P or T, it implies a quasi-static process.
Any engineer would remember to include friction when calculating the dissipative entropy generation.
In this case, no matter how slowly the process takes place, the state of the composite system consisting of the two bodies is far from equilibrium, since thermal equilibrium for this composite system requires that the two bodies be at the same temperature.
Nevertheless, the entropy change for each body can be calculated using the Clausius equality for reversible heat transfer.