Syncronize lower with upper body animations

Hi,
i have two animation sets. From Set A i really do not like the upper boddy part but the Leg movement for the walk and run anims are great. Set B is exactly the opposite. My question: Can i blend them together?
I tried the use of “Blend per Bone” which basicly works with one big issue: they are out of sync and within a couple of seconds of playing this blended animation it just looks totally weird.
I guess the reason is they have different amount of frames and playlength.
If both animations have the same amount off foodsteps, how can i synchronize those two? Or is that just not possible?

Thank you