How to make animation that involves more than just one thing

It might sound a little confusing in the title but what I mean is something like a rig picks up a ball then throws it at a second rig who catches it. I have heard of moon animator but that doesn’t work in-game. I have seen games like entry point do it so I know its possible.

There’s many ways of going about this,

I’m not sure how you want the ball throwing system to work
but I would go about it by making two separate animations.

I would use one animation for the person throwing the ball then once the ball reaches a certain distance or point near the second person I would run the second animation on the person catching it.

how exactly would you make the ball move without hardcoding it?