Entropy changes during transfer of heat between two bodies
This answer is correct.  After determining the final temperature Tf, you have gone back to the initial state of each block and, to get its change in entropy, you have subjected it to an alternate reversible process in which, instead of contacting it with the other block, you have contacted it with an infinite continuous sequence of constant temperature reservoirs running from its initial temperature to its final temperature.  At least, that is what your equation implies.  This is definitely the correct way to determine the entropy change.