Because all of your actors are in a different 3D plane you'll have to separate each out on their own layer, then position them in 3D space. You'll also need to create a 3D floor for them to stand on. This layout is the trickey part because it's difficult to match the perspective by eye. The best hint that I can give you is that perspective is a function of camera position (which should be at it's default position) and that the zoom factor is only used to frame up the shot.
The 3D floor is made of a white solid with accepts lights turned off and accepts shadows turned on. You could then multiply this layer over the original JPG background shot.
I hope this points you in the right direction. Faking shadows in 3D space isn't easy.